WinMerge 2.10 Help

Kimmo Varis

Denis Bradford

Dean Grimm

Laurent Ganier

Tim Gerundt

Perry Rapp

and all others who helped with this.

Revision 1.4.8

Copyright © 2004-2008 Thingamahoochie Software.

Information in this document is subject to change without notice. Other products and companies referred to herein are trademarks or registered trademarks of their respective companies or mark holders.


About WinMerge Help

This is Help for WinMerge 2.10.

1. Audience and scope

WinMerge Help is intended for both new and experienced users. It explains how to use WinMerge, and documents its capabilities and limitations.

2. How to access Help

WinMerge Help topics are provided in two forms:

  • Microsoft HTML Help (WinMerge.chm), located in your WinMerge\Docs installation directory.

  • HTML manual on the WinMerge Web site.

You can access WinMerge Help in several ways:

WinMerge Help menu

While using WinMerge, click Help → WinMerge Help. HTML Help opens at the beginning (this topic).

Context-sensitive help

While using any WinMerge window, press F1. If a specific topic is available for your current window, Help opens at that topic. If not, Help opens at the beginning.

WinMerge command line

Use the /? or -? switch when running WinMerge from the command line. HTML Help opens at the beginning.

WinMerge Web site

Open your Web browser to winmerge.org. Under Features, follow the Online manual link to the latest Help version.

3. How to use Help

Please read the following topics to learn essential WinMerge basics,

Quick start

Gets you quickly started with WinMerge and shows its basic usage.

Comparing and merging folders

Explains the folder comparison window, available operations, and customizing the results display.

Comparing and merging files

Explains the file comparison/merge window, available operations, methods of navigation, and modes.

Options and configuration

Explains how to customize WinMerge, including handling whitespace, colours, and text encoding.

To learn about WinMerge in more detail, read these topics:

Opening files and folders

Introduces several ways to open files and folders in WinMerge - there are many! For example, do you know how to use the Shell Extension context menu in advanced mode?

Plugins

Describes the optional, extra features that you can add to WinMerge using its plugin mechanism.

Using Filters

Explains how to control what is compared in the folder or file comparison window.

Command line

Lists command-line parameters for using WinMerge with other tools or from a script.

Frequently asked questions

Contains answers to many common questions asked of developers.

Before submitting questions to SourceForge.net, please check the Frequently asked questions topic first to see if your question is answered there.

4. Documentation conventions

Example | Indicates
Enter UTF-8 in the field.

Click the Browse button to navigate to the path.

Press F5 once to refresh the window.

Bold font in descriptive text can indicate:

  • A value or string that you are instructed to enter

  • The name of a GUI button or keycap
Press Ctrl+O | Press indicates a keyboard action. In this example, press the Ctrl and O keys in combination.

Click OK.

Click indicates a left mouse click on an object, such as a menu item or button.
Click File → Open. | The arrow indicates menu navigation. In the example, you choose the Open item in the WinMerge File menu .
Right-click the row and choose the Compare shortcut. | Click the right mouse button on an object to open its context menu, and then either left-click or right-click the indicated item in the context menu.
Enter options file.ini

Use the Filter field to eliminate files from the operation.

One or more consecutive different lines form one difference (or diff).

Italicized text can represent:

  • A replaceable value or string. In the first example, you would substitute a real file name for the italicized term, but enter the ini file extension, which is not italicized, as written.

  • The name of a field, menu, or control in a WinMerge window.

  • A significant word or phrase that is introduced.
The path %WORKDIR%\project1 is expanded to C:\workfiles\project1.
TwoWords
 Monospaced text can indicate:

  • A path or the name of a file or other system item

  • Sample code fragments

  • Sample output

  • Information that you enter in a form or on the command line

command inputpath [outputpath]

In syntax lines, brackets indicate optional elements. In this example, you must enter an input path with the command; you can enter an output path, but the command is valid without it.


Quick start

1. Selecting files and folders to compare

After you have installed WinMerge, step through the procedure and discussions in this topic to learn basic WinMerge operations and concepts. The methods shown are not the only ways to do things: there are usually several ways to do each task. When you are done, you can go on to learn other methods and more advanced skills, which are covered in other help topics.

  1. Open the WinMerge window. Here are some of the methods you can use:

    • Double-click the WinMerge desktop shortcut.

    • Navigate to the WinMerge launcher in your Start menu.

    • In a Command Prompt window, cd to the WinMerge installation folder and enter WinMergeU.

  2. In the WinMerge window select the files or folders that you want to operate on. For example:

    • Click File → Open.

    • Click the WinMerge open button Open tool bar button.

    • Press Ctrl+O.

    The Select Files or Folders dialog opens:

    Select Files or Folders window

  3. In the Left and Right fields, specify the files and folders to compare. Use any of these methods:

    • Enter the path names directly into the fields.

    • Click the Browse button to navigate to the desired path.

      In the Open dialog, the text, Folder Selection, is initially displayed in the File name field. Your selection depends on the type of comparison you want to do:

      • If you are comparing files, select the target file. The Folder Selection text is overwritten with your selection.

      • If you are comparing folders, open the target folder; do not select a file. The Folder Selection text remains in place.

      Click Open to dismiss the Open dialog and load your selection in the Left or Right field. If you specified folders, the field includes a backslash ( \ ) at end of the path.

    • Click the combo box and choose a previously-used path.

      [Tip] Tip

      To make it easier to select frequently-used paths, consider enabling the Open-dialog Auto-completion option. With this option, WinMerge shows a list of paths available as you type in the fields. See Options and configuration for details.

    • Drag and drop a file or folder into the dialog or the Left or Right field.

    [Note] Note

    You can select only one pair of files or one pair of folders to compare. If you select a file and a folder or if one of the files or folders is not found, WinMerge disables the OK button in the dialog.

    The status message at the bottom of the dialog also informs you if one of the paths is invalid.

  4. If you are comparing folders, you can use the Filter field to eliminate some files from the operation. The field specifies a subset of files in the selected paths that are to be included; all unspecified files are excluded.

    You can enter file masks to filter files with certain extensions. For example, this expression includes only C and C++ source files; all other file types are eliminated from your selection.

    *.cpp;*.hpp;*.c;*.h

    For more robust filtering, enter a filter file instead of file masks: click the Select button next to the Filters field to choose from a list of available filters. File filters contain any number of rules to either include or exclude files. WinMerge installs a set of filter files, which you can edit or augment with your own files.

    See Using Filters for full details about file masks and filter files.

  5. The Include Subfolders check box provides another way to control the scope of folder comparisons. If you check this option, WinMerge recursively compares subfolders, and shows all the files and folders it finds in one view. If you disable the option, only the current folder is compared, and subfolders are listed by name (without their contents), so you can browse into them.

  6. The Unpacker field enables you to perform compare operations on plug-ins.

1.1. Other ways to open files and folders

The Select Files or Folders dialog is the main interface for opening files and folders. But you can use many other ways, too:

  • Project files are the easiest and fastest way to open frequently used paths. To open a project file, use one of these methods:

    • From the WinMerge window, click File → Open Project.

    • From a command line.

    • From the Opening Files and Folders dialog, specify a project file in the Left field.

      [Note] Note

      If you specify project files in both the the Left and Right fields, WinMerge does not open either project file; it simply compares the XML content of the two files.

    See Opening files and folders for more information about project files.

  • Right-clicking files or folders in Windows Explorer, choosing WinMerge in the context menu.
  • The command line allows you to start WinMerge from other applications, from a command prompt, or a batch or script file.
  • You can drag and drop files and folders directly into the WinMerge window or on the WinMerge desktop shortcut.

2. Comparing folders

If you selected two folders in the Open dialog, the Folder Compare window is opened. The Folder Compare window is a tabular list of items found in the compared folders. Each row displays information about a found file, with the file name in the left column and additional information in the other columns:

Folder Compare window

WinMerge does not have a concept of original and changed sides. Instead, it simply shows what is different between two selected folders. For example, a file or folder that is found only on one side is simply shown as a unique item on that side. It is not shown as added or removed. For example, in the Comparison result column of the preceding figure, Merge.aps and Merge.rc.bak are each found in only one of the compared folders.

You can manage files and folders in many ways using the Merge menu, toolbar buttons, or context (right-click) menu. The most important action is making files or folders identical in both sides by selecting one of several Copy items. When you copy a file or folder to other side, the Comparison result value changes to Identical.

If a file or folder exists in both sides (and it is not a binary file) it can be opened for file comparison using one of these methods:

  • Click Compare → Merge in the WinMerge menu.
  • Right-click the row and choose the Compare shortcut.
  • Double-click the row.
  • Select the row and press Enter.

If you compare a subfolder, the new folder's comparison table is loaded in the current Folder Compare window . When you are done with that folder's comparison, you can navigate back to its parent folder by double-clicking the Navigator up arrow button up arrow at the top of the Filename column.

If you compare a file, WinMerge opens the File Compare window, described in the next section. If you change a file in the File Compare window, and then return to the Folder Compare window, you will see the file's data is updated there.

3. Comparing files

File Compare window

The File Compare window shows the two selected files side by side, in separate File panes. Different lines are highlighted with a background color. One or more consecutive different lines form one difference (or diff). In the preceding example, a single difference is selected in the File panes and displayed by itself in the Diff Pane. WinMerge mainly works with these differences, not separate lines. When you merge a difference, you copy all of its lines from one side to the other.

[Important] Important

Notice how WinMerge fills missing lines, so that similar lines are always aligned vertically, side by side. This is different from most other compare/merge programs, and can take a while to learn.

WinMerge has a simple integrated editor that features basic typing, copying, cutting and pasting of text. If Automatic rescan is enabled, WinMerge updates file differences while you edit a file. If Automatic rescan is disabled, you can update files by selecting Edit → Refresh, clicking the Refresh button toolbar button, or pressing F5.


Introduction to WinMerge

WinMerge is an Open Source differencing and merging tool for Windows. WinMerge can compare both folders and files, presenting differences in a visual text format that is easy to understand and handle.

WinMerge is highly useful for determining what has changed between project versions, and then merging changes between versions. WinMerge can be used as an external differencing/merging tool or as a standalone application.

In addition, WinMerge has many helpful supporting features that make comparing, synchronising, and merging as easy and useful as possible. Several programming languages and other file formats are syntax-highlighted.

WinMerge is not a hex editor. WinMerge can show binary files contents and differences between them. But the information is meant for viewing only: editing binary files with WinMerge can break the files.

The goal of WinMerge development is to make comparing, synchronizing, and merging folders and files easy and fast, while maintaining maximum reliability. Ease of use is of key importance for reducing errors. The latest version, 2.10 is considered a stable and reliable program to use.

Please note that WinMerge is not freeware (as many sites on the Web have stated): it is GPL licensed. We provide you with a good tool for free, so please honor your license agreement and submit improvements to us. We are happy to get help improving WinMerge, to the advantage of all WinMerge users.

1. WinMerge versions

There are three kind of versions available in the downloads page.

1.1. Stable versions

Stable versions are recommended for most users. If you are unsure about what version to use, use the latest stable version. Stable versions have an even second number, for example, 2.4, 2.6 and 2.8.

1.2. Beta versions

Beta versions are for people who want to test latest features and improvements made after last stable version. Beta versions are not tested as extensively as stable versions and probably have some bugs. Beta versions have an odd second number, for example 2.5 and 2.7. Beta versions can be used in production, because they are not expected to have major bugs. But there is always a risk with using beta-level releases, so consider it carefully. We have tried to release a new stable series once a year, so it may be worth waiting for few months for the next stable release...

1.3. Experimental versions

Experimental versions are snapshot releases from our version control system (Subversion). They have all the latest features and improvements. Some features may still be buggy or incomplete. These releases are made available to allow users to try out the current code without needing to compile, and to participate in development discussions concerning new and changing features. We also appreciate any help testing the current code. Use experimental versions with care and enable backups! And please report bugs that you find while using these builds: it really helps with WinMerge development!

1.4. Version tree

All this talk about different versions might be confusing if you never have worked with this kind of model. Lets illustrate with a picture:

WinMerge stable and development versions

The preceding diagram shows the relationships between different releases and versions. Development always happens within experimental and beta development versions. At the appropriate points we create new branches for stable releases. In the diagram, the arrows for 2.4.x and 2.6.x versions are two current stable branches. (The diagram is a snapshot; it is not updated to show the current stable branch).

[Important] Important

A branch always indicates a separate development effort. There is no any automation to copy improvements or fixes from development versions to stable versions, or in the opposite direction. Changes are always selected by hand and then merged (using WinMerge, of course).

After a branch is created, we try to keep the code in it as stable as possible. Usually this means that we copy only tested bug fixes from development versions to stable versions. Unfortunately this is not always an easy task, and errors can occur. New bugs can also appear in stable versions: this is real-life software development. However, in general, quality increases in branches. For example, 2.6.14 was a better release than 2.4.0. So we always recommend using the latest stable branch release.

This branching also means that stable versions don't get many new features after a branch is created. Stable versions 2.6.0 and 2.6.14 had pretty similar features. After the 2.6 stable branch, we created a new stable branch, 2.8, where we added many improvements and fixes.

Many software vendors always increase their version numbers and advise people to use the version with the biggest number. If WinMerge were developed as proprietary software, users would see only versions from stable branches. But because WinMerge is an open source software project, we want to keep our development as open as possible and to release many development versions. The latest development version can have version number 2.9.1.0 and the latest stable version can be version 2.6.14.

2. Getting support and reporting bugs

The Open Discussion forum is the fastest way to get help. Please be patient, it may take some time for somebody to answer.

If you find a bug, please submit it as a bug report. Please attach as much information as you can: at a minimum, the version number of WinMerge that you are using. If you can, also attach a configuration log which, you can display by clicking Help → Configuration in the WinMerge window. Good information in a bug report makes it more likely that your bug will be fixed quickly.

[Important] Important

Include the version number in bug reports. You can check the version number by clicking Help → About WinMerge.

We prefer that you register with SourceForge.net before posting a bug report (registration is public and free), so that you receive email notifications if we post follow-up questions to your bug. Registration is not currently required for you to post a bug report. However, we generally give less priority to unregistered bug reports, because it has been our experience that unregistered posters often do not return to answer follow-up questions.

3. WinMerge source code and development

WinMerge source code is available in the downloads page and from the public Subversion server. Anyone can download the sources, study them, and alter them. If you find (and fix) bugs, improve something, and so on, please submit your changes to us as patches and help improve this product! If you publish your altered version, you are required to publish the changes to source code too. This is what the GPL license is about: please respect it.

While WinMerge development has been fast in the last couple of years, all this work is done by people in their spare time. Nobody gets paid for improving WinMerge. We try to fix bugs as we find them or when somebody reports them to us. We really try â€” we use WinMerge too. But there are absolutely no promises for new features. We always appreciate any help with WinMerge, be it testing, documenting, translating, or coding.

3.1. Participating in WinMerge development

As mentioned above, we look for help in many areas, not just coding. Translation, documentation, and testing are important too.

The Development Wiki is a good source of information if you want to help with WinMerge development. The Help Needed page in the wiki has more information about how to help with WinMerge development.

The development-mailing list is the preferred place for development discussions. Another place is in the developers-forum. If you are interested in helping with WinMerge development, let us know. If you want to fix one of our bugs or implement a new feature, let us know.


Getting and installing WinMerge

WinMerge can be installed using the installer or by unzipping files from an archive. Using the installer is the recommended method.

[Note] Note

Currently the WinMerge installer works natively only for 32-bit Windows. There is no separate version of WinMerge for 64-bit Windows (WinXP/2003/Vista). 64-bit Windows versions can run the installer and WinMerge as 32-bit applications. For the shell Integration, the installer includes the 64-bit version of the extension.

1. Getting files

The latest release can be always downloaded from the WinMerge home page: WinMerge.org. Note that delays can occur in updating home pages for the latest releases, but the project status page at SourceForge.net shows the latest files. There is also a mailing list for release announcements. Stable releases are also available in several file download sites.

2. Using the installer (recommended)

[Note] Note

The installer requires Administrator user privileges in Windows NT4/2000/XP. If you don't have admin user privileges, you can install WinMerge by unzipping from an archive file (see Installing from an archive).

Using the installer is recommended for most users. The installer prompts for the location where WinMerge is installed. It then installs the files, configures the shell integration, and adds WinMerge to the Start menu. To install WinMerge:

  1. Start the installer executable (usually named WinMerge-version-setup.exe).
  2. Click Next in the Welcome screen.
  3. Click Next in the License Agreement screen.
  4. In the Select Destination Location page, accept the location for WinMerge or, if you choose another location, we recommend that you install WinMerge in its own folder. Click Next.

  5. In the Select Components page, choose one of the preconfigured installations in the top control. We recommend the Typical configuration for most users. The lower box shows all the available components. You can modify the default configuration by checking or unchecking components. For example, if you want to use a WinMerge localization for a different language than English, select the Languages component.

    WinMerge core files

    WinMerge executable (WinMerge.exe on Windows 9X and WME; WinMergeU.exe on all other Windows versions), Help, and other needed files. Cannot be unchecked.

    Filters

    File filter files

    Plugins

    Plugins and scripts

    Languages

    WinMerge translation files. If you want to configure WinMerge to use a different language than English, expand this item and choose one or more available translations. The installer creates a Languages subfolder in the WinMerge folder, containing a *.po translation file for each of your selections. After installation, you can open WinMerge and change its localization to one of the translation file languages. See Locale support for details.

    Click Next.

  6. In the Select Start Menu Folder page, configure WinMerge shortcuts.

    • Accept the default setting to create a program shortcut, or specify a different folder.

    • Optionally, check the option, Don't create a Start Menu folder.

    Click Next.

  7. In the Select Additional Tasks page, specify any additional tasks:

    Enable Explorer context menu integration

    Enables basic WinMerge shell integration (can be enabled later in WinMerge options).

    Integrate with TortoiseCVS

    Sets WinMerge to be the TortoiseCVS diff application.

    Integrate with TortoiseSVN

    Sets WinMerge to be the TortoiseSVN diff application

    Integrate with ClearCase

    Sets WinMerge to be the ClearCase diff and merge application

    Create a Desktop shortcut

    Adds the WinMerge shortcut to your Desktop.

    Create a Quick Launch shortcut

    Adds the WinMerge shortcut to Quick Launch bar.

    Click Next.

  8. In the Ready to Install page, verify your install selections. If necessary, click Back to change anything in a previous page. When you are sure that you are ready to proceed, click Install.
  9. After the installer has copied files, the final screen appears. Using the two check boxes, confirm whether the created WinMerge Start menu folder should be opened, and whether the WinMerge application should be started.

3. Installing from an archive

WinMerge is pretty much independent of other system components. It is not tightly integrated with Windows, and does not use many DLLs.

WinMerge[U].exe itself depends on MFC71[U].dll , MSVCR71.dll and MSVCP71.dll, in addition to some system DLLs. So if these DLLs are already installed on a system, only WinMerge[U].exe is needed to run WinMerge. The DLL files listed above are also available as a downloadable runtime package.

[Note] Note

WinMerge 2.6.0 and later versions require a new version of runtime libraries. When you update from older WinMerge versions using archive files, you need the new runtime files from the runtime package.

Archive files have the correct folder structure. WinMerge should be unzipped preserving this folder structure in the destination folder. For example, the root folder created under C:\Program Files\ has the name, WinMerge-version (for example, WinMerge-2.6.0). You can rename this folder or copy its files to another folder (preserving the folder structure!).

After the files are unzipped, WinMerge is ready to run! Shell integration and archive integration may need additional steps, as described in the next section.

4. Shell integration

The installer enables shell integration when you choose the Enable Explorer context menu integration option in the Select Additional Tasks page. If you do not use the install program: you must register the shell integration DLL (ShellExtension*.dll) separately.

[Note] Note

Installing shell integration requires Administrator user privileges.

First, uninstall the current shell integration version by running unregister.bat from the WinMerge directory. Then restart the computer so that Windows completes the uninstall.

To register the shell integration DLL (ShellExtension*.dll), run register.bat from the WinMerge directory. We recommend that you restart the computer after installing shell integration, so that Windows updates all its references.

4.1. 64-bit shell integration

Starting with Version 2.6, WinMerge supports 64-bit Windows versions by including 64-bit shell integration. The WinMerge installer recognizes 64-bit versions of Windows and can install the correct shell integration version.

When you install shell integration manually from an archive file, the shell integration DLL is named ShellExtensionX64.dll. You can register and unregister this file by using register.bat and unregister.bat, as with 32-bit versions.

5. 7-Zip and archive support

WinMerge uses 7-Zip for archive support, but the WinMerge installer does not install 7-Zip or archive support. Installing the 7-Zip application is recommended but not required for archive support. The 7-Zip installer is available for downloading from 7-Zip.org.

[Important] Important

There are 7-Zip MSI installers that do not install all the files WinMerge needs (specifically, 7zip_pad.xml in the 7-Zip program folder). If there are problems with archive support enabling, try running the EXE version of the 7-Zip installer.

To install archive support, download and install the7-Zip plugin from WinMerge.org, as described in the Merge7z Installer section of this topic.

WinMerge automatically detects an installed 7-zip in the system, so no configuration is needed.

7-zip integration needs a compatible Merge7z*.dll file in the WinMerge program directory, where * is the 7-Zip version installed. For example, 7-Zip version 4.42 requires Merge7z442.dll. And if WinMergeU.exe (the Unicode version) is used, then U is also added to filename, as in: Merge7z442U.dll. If the required DLL file is missing for any reason, you can copy it to the WinMerge directory, for example from the 7z-Plugin archive that is available from the WinMerge download page.

If the Merge7z*.dll file is missing, WinMerge displays a message that includes the name of the missing file and the recommended version of 7-Zip. You can also display this message by clicking Help → Archive Support Disabled.

5.1. Merge7z Installer

Merge7zInstaller is a stand-alone installer for 7-Zip integration.

Installer file names may seem strange at first, but there is reason for them: they show the supported versions. The file name is formatted as

Merge7zInstallerXXX-YYY-ZZZ.exe

where XXX is the build number, YYY is the earliest 7-Zip version supported, and ZZZ is the latest 7-Zip version supported.

For example, Merge7zInstaller0014-311-426.exe means build version 14, support for 7-Zip versions 3.11 to 4.26.

This separate installer is much more flexible, because we can update it whenever 7-Zip is updated, and we don't add files to the base installer that users don't need.

The latest version is always available at 7-Zip plugin in our download page at SourceForge.net, and of course from our home page at WinMerge.org.

[Tip] Tip

If you want to know immediately when we release new versions, you can monitor our releases. You are then notified through e-mail of new releases when they happen.

Running the Merge7zInstaller is simple:

  1. Start the installer executable.

  2. Select the installation type and the DLL files (supported 7-zip versions) to install:

    Shared installation

    Copies the 7-Zip plugin files to the system directory so they can be shared between multiple WinMerge installations and other programs using the 7-zip plugin. This is the recommended installation.

    Application specific installation

    Copies the 7-zip plugin files to the program directory. Files are then usable only by that program.

    When you choose this option, you must select the executable in the directory where the plugin files are installed. Select the WinMerge executable file when installing to the WinMerge directory.

    Enable standalone operation

    Also installs the required 7-Zip files to the program's application-specific installation directory. This allows the minimal usable installation of 7-Zip for archive support. You can use this option when the 7-Zip application is not wanted or needed.

    This installation type contains only the files needed for WinMerge (or other application) to enable archive support. It does not install the 7-Zip user interface or other related tools or files. After this installation it is not possible to open or create 7-Zip archive files outside of WinMerge.


Overview of file comparing and merging

This topic describes how WinMerge detects and displays differences within files, and demonstrates simple file comparing and merging operations.

1. Comparing files

We usually compare two files that are related in some way, such as two versions that were edited at different times, or by different people. If you examine two such files you can usually see some similar areas, and also identify several types of differences: different characters and words, different lines, even entire blocks of text that are different. But trying to understanding all the differences between two files by scanning them in your favorite editor can be tedious and error-prone. Specialized difference/merging tools like WinMerge are designed make this work more systematic and efficient.

A simple difference utility that most people have used is a spell checker: it systematically steps you through a document, highlights words that are different from those in its dictionary, and helps you resolve each spelling problem. However, looking only at characters and words is not an effective way to understand differences between multiple files. For this reason, many difference utilities use lines as the basic unit of comparison instead.

WinMerge also uses lines as its basic unit of difference. Words and characters are not treated individually in comparing and merging operations. To illustrate, consider two files that are identical except for one line that is different. If the two versions of the line have four words that are different and one version has an extra space, then we say that the file has one difference, not five.

If it's quicker to compare lines than words, sometimes it's also useful to treat an entire block of lines as a single difference, instead of comparing one line at a time. As we will see later, detecting multiple-line differences makes merging more efficient too.

1.1. Simple compare operation

This section offers a simple example that demonstrates how to compare line differences between two files in WinMerge:

  1. Using a text editor, create two files with the names and contents shown here, being careful to preserve the words and line breaks exactly:

    File1:

    It's slow comparing words
and characters. Instead,
WinMerge compares lines.
Believe it or else.

    File2:

    It's slow comparing words.
WinMerge compares lines.
Believe it or not.

  2. Start WinMerge. For example, double-click the WinMerge desktop shortcut WinMerge desktop shortcut.

  3. In the Select Files and Folders dialog, specify File1 as the Left file and File2 as the Right file, then click OK. The File Compare window displays the two files in the left and right File pane, like this:

    Compare Files screen shot

    The elements are described in more detail in Comparing and merging files. Here are some features you should notice in this example:

    Number of differences

    The message in the status bar at the bottom of the WinMerge window tells you that two differences were detected.

    Difference colors

    The basic difference color is dark yellow, by default. Identical lines (like the third line in the example) are unmarked: they have white backgrounds.

    Blank lines

    Notice that in the left comparison pane, the second line has text: the other pane has a blank gray line in the same location. This blank line does not exist in the File2 source file, so what is it doing in WinMerge?

    WinMerge inserts one or more gray blank lines in one version of a difference when the other version has more lines. These empty gray lines do not represent blank lines in the source file; they are only placeholders in the display. The purpose of placeholder lines is to keep the left and right versions of differences vertically aligned. Thus in our example, the text, WinMerge compares lines, appears side by side in the Comparison window, even though they are on different lines in the source files. This makes it easier to compare differences in WinMerge than in a conventional editor.

    [Tip] Tip

    One consequence of the blank lines is that both panes in the File Compare window always display the same total number of lines, even if their source files do not.

    Now that you understand how WinMerge detects and displays differences, you can use the comparing functions effectively, as shown in the next steps.

  4. Click Current Difference button Current Difference in the toolbar (or press Alt+Enter). If this button is not enabled (for example, if your cursor is in a different line), click First Difference button First Difference (or press Alt+Home) instead.

    When you select a difference, the two versions are loaded in the Diff pane. The Diff pane confirms which lines are included in a difference, and lets you examine them in isolation from the rest of the file. In our example, Difference 1 clearly has two lines.

    Compare Files Diff Pane

  5. Click Current Difference button Next Difference in the toolbar (or click Alt+Enter). This jumps over the identical line (which is not a difference) and selects the last line.

    You have reached the end of the file and had a chance to examine every difference. This was a trivial example — there were only two differences — and there are other ways to compare differences in WinMerge. But it demonstrates the efficiency of using the WinMerge navigation controls.

2. Merging files

The purpose of merging is to combine changes from two files into one file. Merging extends the concepts and functions used in comparing operation: please read the preceding section before beginning this section. In addition to detecting differences between two file versions, we resolve the differences and save the result in a single target version.

Merging files makes concurrent development possible, and it is a common task in team environments. For example, suppose you and another person want to add code to the same program file at the same time. You both begin with an identical copy of the file, but during development you create separate versions that are not identical. At some point, the two versions must be merged into one version that preserves the changes from each contributor.

Merging can be prompted (or even initiated) by version control systems like Subversion and ClearCase. For example, your version control system might prevent you from submitting changes to its repository because of merge conflicts. A conflict can occur if someone else checked in a different version of the same file while you were working on your version, and the version control system was not able to automatically merge the differences. When that happens, you might need to merge the conflicting versions before trying again to contribute your version. Many systems have integrated difference and merge tools, but you might prefer to use WinMerge instead.

Just as with comparing, you use WinMerge's toolbar controls (or keyboard shortcuts) to systematically step through the differences. Resolve each difference by copying either its left or right candidate to the other side. When you have resolved all the differences, WinMerge lets you know that all differences are resolved (the versions are identical), and you are done merging.

2.1. Simple merge operation

This short exercise demonstrates how to use the controls in the File Compare window in a systematic way to merge the simple files shown earlier:

  1. Click Current Difference button Current Difference in the toolbar to select the first difference. If this button is not enabled, click First Difference button First Difference instead.

  2. Click Copy Right button Copy Right to merge difference 1 from File1 to File2. In File2, notice that the single difference line is replaced by the two lines from File1, and the gray blank line is now gone.

  3. Click Next Difference button Next Difference to select Difference 2. This is easier than finding and selecting the difference yourself. It's especially useful if you want to step through all differences without accidentally missing any.

  4. Click Copy Left button Copy Left to merge Difference 2 from File2 to File1.

    The message that the the files are identical tells you that the merge is complete:

  5. Click OK to dismiss the message. The status Difference message changes from Difference 1 of 1 to identical.

  6. Press Ctrl+S to save your changes.

While very simple, this example demonstrates a basic methodology that you can use to step through a comparison of any length, merging each difference one by one until you have the result that you want.

2.2. Choosing a merge result file

You control where your merge result is preserved. The WinMerge File Compare window does not have a separate result pane, as some merge tools do. So the simplest strategy is to save your changes to one or both source files. Press Ctrl+S at any time to save the current changes to both files; alternatively, click File → Save Left or File → Save Right to save only one file.

To write to a third file instead of either source file, use File → Save As. For example, your target file might be the difference or conflict file generated by a version control system.

Similarly, in the WinMerge command line, you can leave both source versions unchanged by using the optional outputfile argument, as described in Command line.


Opening files and folders

WinMerge provides several ways to specify paths and open files or folders:

  • Select Files or Folders dialog

  • Shell integration

  • Drag and drop

  • Project files

1. Select Files or Folders dialog

Quick start describes the Select Files or Folders dialog. This section provides more details, and some tips for using the Select Files or Folders dialog more efficiently.

1.1. Using environment variables

You can use environment variables in your paths. Windows expands the variable name between % (percent) delimiters. For example, if an environment variable named WORKDIR has the value c:\workfiles, then the path %WORKDIR%\project1 is expanded to c:\workfiles\project1 .

1.2. Opening archive files

WinMerge archive support is provided in the 7-Zip plugin. See Getting and installing WinMerge to install this plugin.

Opening two archive files is similar to opening normal files: specify two archive files in the Open-dialog's Left and Right fields. If WinMerge recognizes the archive format, it opens the contents of the archive files in the Folder Compare window.

The Comparing and merging folders topic describes how to work with archive files. For example, if an archive file contains two subfolders named Original/ and Altered/, you can compare the contents of the two subfolders by specifying the same archive file in both sides in the Select Files or Folders dialog or WinMerge command line.

[Tip] Tip

When you drag an archive file to the WinMerge window, press Shift when dropping the file: WinMerge automatically copies the same filename to both sides and opens the archive file.

1.3. Applying filters

The Filter edit field enables you to restrict the files to be included in your folder compare. You can specify one or more file masks, or a single file filter (not both).

A mask is a simple expression based on file extensions. For example, this list of file masks includes only files with the specified extensions; all others are excluded from the selection when the compare operation starts:

*.h;*.cpp *.txt,*.ini

File masks are practical for simple filtering; for more advanced selecting, use filter files. Filter files are collections of regular expressions that can either include or exclude files. WinMerge installs a number of predefined filter files in its Filters folder, and you can create your own, too.

To specify a filter, click the Select button next to the Filters field to choose from a list of available filters. Or, click the Filter drop-down list and choose a recently-used filter file.

For full information about filter masks and filter files, see Using Filters.

1.4. Selecting an unpacker for file comparisons

Unpackers are plugins that are installed with WinMerge to provide functionality that is not used by default. Plugins that can be used to preprocess certain types of files before comparing them. For example, WinMerge cannot normally compare MS Word doc files, but by unpacking them, you can compare just the text contents. See Plugins for details.

To apply a plugin to your file comparison, click the Select button for the Unpacker option. In the Select Unpacker dialog:

  1. Configure automatic plugin selection or choose a plugin manually:

    • To use automatic mode (which applies the first available plugin), verify that <None> is displayed in the the File unpacker control.

    • To choose a different plugin (if available), use the File unpacker control to choose the plugin.

      By default, this control lists only suggested plugins for the file type you selected to compare. To see all available plugins, enable the option, Display all packers, don't check the extension.

    • To launch the compare without using any plugin, choose <None> in the File unpacker control.

  2. Click OK to close the Select Unpacker dialog.

Your choice is displayed in the Unpacker field. Note that you cannot select an unpacker when launching a Folder Compare operation.

2. Shell integration

The Windows shell Integration is a convenient way to select paths and open WinMerge directly from Windows Explorer. It adds a WinMerge shortcut in the Explorer context menu (available when you right-click one or two files or folders in Explorer). For example:

Simple WinMerge context menu

You can enable the shell integration when you install WinMerge. After installing WinMerge, you can enable or disable the shell integration in the System page of the Options dialog.

To use the shell integration, begin by selecting either one or two paths in Windows Explorer:

  • If you select a single path, WinMerge opens the Select Files or Folders dialog. It places the selected file or folder in the Left field, leaving the Right path for you to specify.

  • If you select two files or folders, WinMerge opens them directly in the File Compare or Folder Compare window. However, if one or more paths cannot be opened for any reason, WinMerge opens the Select Files or Folders dialog for you to reselect the paths.

2.1. Advanced shell integration

The advanced shell integration enables you to control the order in which paths are compared when you launch WinMerge from the Windows Explorer context menu. To configure the advanced shell integration, select Enable advanced menu in the System page of WinMerge options.

In the standard shell integration, when you select two paths in Windows Explorer and then right-click and choose WinMerge, the order of comparison in WinMerge is determined by the sort order in Windows Explorer. For example, if your Windows Explorer file list is sorted by name descending, and you select File1 and File2, WinMerge opens with File1 on the left side and File2 on the right. You can change the order only within WinMerge, after it opens.

The advanced shell integration replaces the standard WinMerge shortcut in the Windows Explorer context menu with a set of shortcuts that enable you to control the comparison order before launching WinMerge:

Advanced WinMerge context menu
Compare To

Designates the selected path as the first (Left) path in the comparison. The path is loaded in memory; meanwhile WinMerge waits for you select the second path in Windows Explorer, using the Compare shortcut (described next).

Compare

Designates the selected path as the second (Right) path in the comparison, and opens WinMerge in one of these ways:

  • If you previously designated the first path (using Compare To), WinMerge opens the File Compare or Folder Compare window, and compares the first and second paths you have specified.

  • If you click Compare before designating the first path, the Select Files or Folders dialog is opened, with your selection as the first (Left) path. Specify the second path in the Right field to continue with the comparison.

Re-select First

Available in the context menu only after you apply Compare To. Designates the selected path as the first path, overriding the previous Compare To selection. This is useful, for example, if you accidentally select the wrong first path.

The shell integration paths that you map are stored in memory until you use them to open WinMerge. As a result, you don't need to select both files at the same time or even using the same Windows Explorer view: you can choose one, open a different directory, and choose the other one. Both paths are discarded from memory after a compare operation. This means that you cannot select one Compare To path and compare it against several paths.

Here is a simple method of using the advanced integration נthere are other scenarios, of course. In Windows Explorer:

  1. Right-click the first item you want to compare and choose the Compare To shortcut in the context menu. The path is now in memory.
  2. Locate the second item you want to compare. Right-click the item and choose Compare to launch WinMerge and perform the comparison.

2.2. Including Subfolders

By default, WinMerge does not include subfolders in compare operations. To change the default behavior, enable Include subfolders by default in the System page of WinMerge options. To change include subfolders while using the shell integration, press and hold the Control key while selecting Compare in the Windows Explorer context menu.

3. Drag and drop

From any Windows source that allows you to drag objects, such as Windows Explorer or the Desktop, you can drag and drop one or two paths into the WinMerge window. If you drop only one path into WinMerge, the Select Files or Folders dialog opens for you to select the second path. If the single path specifies a project file, then the project file is opened.

By default, WinMerge does not include subfolders in compare operations. To include subfolders, press and hold Control while dropping paths. Another useful key when dropping paths is Shift: To open the same path in both sides of a Compare window, press and hold Shift while dropping only one path. This is a handy way to open archive files (see Opening archive files.

You can drop paths into the Select Files or Folders dialog. A typical procedure is to drag and drop the first path into the WinMerge window, and then drag and drop the second path into the Select Files or Folders dialog. When a path is dropped into the Select Files or Folders dialog, it is loaded into either the left or right path field:

Left

If the left field is empty or both path fields already contain paths

Right

If the left path is not empty and the right path is empty

4. Project files

You can save the currently open paths and filters in a project file. Then, you can easily open the project later to compare the same files. Project files are handy if you compare the same files repeatedly.

4.1. Using project files

To use a project file In the WinMerge window, click File → Open Project. WinMerge reads the paths from the project file. If the project file has two paths, both paths are opened. If only one path is given or one of paths is invalid, WinMerge opens the Select Files or Folders dialog, where you can add or correct the path information. Here are a few things to consider:

  • If you specifiy two project files, the project files themselves are compared.
  • If you specify a project file as the left file but do not specify a right file, the single project file is opened as if you had used the File → Open Project command.
  • If you specify a project file as the left file and any other file on the right side, the contents of the project file and the other file are compared.

To specify a project file on the command line, simply enter it as a single file path.

4.2. Editing and saving project files

To save a project file, click File → Save Project. The Project File dialog provides fields and options that you can easily edit to build a project file. If a compare window is currently open, the Project File dialog is initialized with values from the current compare; otherwise, you provide the values yourself. To use an existing project, click Open and select a project to load its values (any existing values are overwritten in the dialog).

When you finished editing, click Save to store the file.

Project File dialog

4.3. Project file format

Project files are simple XML files with a .WinMerge extension. For example:

<?xml version='1.0' encoding='UTF-8'?>
<project>
   <paths>
      <left>c:\work\project1</left>
      <left-readonly>1</left-readonly>
      <right>c:\work\project2</right>
      <right-readonly>0</right-readonly>
      <filter>Visual C++ loose</filter>
      <subfolders>0</subfolders>
   </paths>
</project>

A project file contains a paths element that can contain one of each of these elements:

left

Left path to open

left-readonly

1 = Open read only

0 = Open normally

right

Right path to open

right-readonly

1 = Open read only

0 = Open normally

filter

File filter name or list of extensions

subfolders

0 = Subfolders not included

1 = Subfolders included

None of the fields is required, and they can be empty (for example, <left></left> or <left/>).


Comparing and merging folders

This topic describes how to compare and merge folders using the Folder Compare window.

[Note] Important note for ANSI WinMerge users

In the ANSI version of WinMerge (WinMerge.exe) that is typically installed on older versions of windows, comparisons are set by default to use the default Windows ANSI codepages on your system - for example, Windows-1252 on many Western European systems). If the files you are comparing all use this format, the default settings are fine.

However, if you plan to compare files with different encodings (for example, UTF or another Windows codepage), you might need to change the default codepage settings, as described in Codepage options. If you are running the Unicode version of WinMerge (WinMergeU.exe), comparisons handle different encodings transparently, and so codepage settings do not affect you.

1. Starting a folder compare operation

You can begin a folder compare operation from either the WinMerge window or a Command Prompt window.

From the WinMerge window

Click File → Open. Use the Select Files or Folders dialog to specify the left and right folders to compare. By default, the compare includes all files in the folders, and is nonrecursive (does not include subfolders). To change any of these options and for more details about the Select Files or Folder dialog, see Opening files and folders.

From a Command Prompt window

Run WinMergeU.exe, which is in your WinMerge install directory. In your command arguments, include the left and right folders to compare. By default, the compare includes all files in the folders, and is nonrecursive. To change any of these options and for information about other command options, see Command line.

[Tip] Tips
Recursive mode

Recursive mode is useful for detecting and manipulating different files in an entire folder structure. However, it can be slow if there are many subfolders and files.

Nonrecursive mode has the advantage of speed when there are many subfolders that need not be examined. Also, the display can be easier to manage because it shows items in only selected folders.

Quick Contents comparisons

The Quick Contents method for file comparison, described in Options and configuration, can be useful when you compare big binary files; and it is automatically used to compare files bigger than 4 MB. Possible disadvantages are that line filters do not work, and there is no difference counts information in the Folder Compare window. This should not matter In most cases, because such large files are usually binary.

To use this method, configure it before your compare operation: in the Compare page of the WinMerge options, click the File Compare method drop-down menu and choose Quick Contents.

For advanced users

You can change the 4 MB file size limit of the Compare by Quick Contents, for example if you have a lot of very big text files. To do so, run the Windows regedit command, navigate to this keyword, and modify its value:

HKEY_CURRENT_USER\Software\Thingamahoochie\WinMerge\Settings\QuickMethodLimit

As usual, be careful when editing the registry!

1.1. Folder Compare Progress window

When you start a folder compare operation, WinMerge displays this status window:

Folder Compare Progress window

If the compare operation is quick, you might not notice the Progress window, which closes as soon as WinMerge displays the Folder Compare result. The Progress window shows the number of files and folders to be included in the operation, and the number compared so far. The progress bar graphically represents the Items compared.

[Note] Note

Because the files compares are usually of different sizes, the status data does not indicate the time used or remaining. For example, a 50/100 ratio does not necessarily mean that half of the compare operation time is expired.

You can click Stop to terminate the operation at any time before the compare operation finishes. The Folder Compare window is displayed with the results calculated at that time, omitting any uncompleted results.

2. Folder Compare window

The Folder Compare window shows the result of a folder compare in a tabular view. Each row lists a file, parent folder, or subfolder in the result, and the columns show different types of data for each item. You can customize the table by changing the sorting of rows or the types of column data displayed. Here is an example of a folder compare result:

2.1. Recursive and nonrecursive compare results

The Folder Compare window looks and behaves slightly differently for recursive and nonrecursive compares:

Recursive folder compare

The compare result includes all subfolders. You can control the types of items displayed within the folders by choosing the options in the View menu (for example, Show Identical Items). The Folder column is always empty: only the files within the folders are displayed. To see an item's subfolder, look at its path in the Compare result column. Folders that exist on only one side are displayed if one of the View menu options, Show Left Unique Files or Show Left Unique Files, is enabled.

Nonrecursive folder compare

The result includes only the files and subfolders at the top level of the selected folders. However, you can browse to any subfolder that you want to compare.

2.2. File and folder icons

In the Compare Folders window, files and folders are compared and divided into several categories. In each row, the category is clearly identified in the left column with one of these icons :

Identical text files
Differing text files
Identical binary files
Differing binary files
Left-only folders
Right-only folders
Left-only files
Right-only files
Skipped directories (filtered out)
Skipped files (filtered out)
Items that couldn't be compared. This usually happens when other program has locked the file.
Aborted item. WinMerge did not finish comparing this item when compare was stopped. Result is unknown.

2.3. Navigating the Folder Compare window

You can use the mouse as well as keyboard and context menu shortcuts to navigate the Folder Compare window. You can also use the toolbar buttons. For example, the Next Difference button Next Difference button finds the next different file or folder and selects it.

[Note] Note

Unique files and folders are navigated in the same way as different ones.

You can select multiple files and folders. However, some operations (like Rename) are not available with multiple selections.

Use the navigation buttons (Next Difference, Previous Difference, and so on) to step through differences in the compared files. Use WinMerge functions to merge contents by copying, moving, or delete one or more files or subfolders.

3. Working with multiple Folder Compare windows

By default, the WinMerge window displays a single Folder Compare window. That is, if you start another file comparison while a Folder Compare window is currently open, the new Compare window replaces the current one. If you prefer to work with multiple compare operations simultaneously, consider setting (checking) the Enable multiple compare windows for Folder compare option.

3.1. Using tabs with maximized Compare windows

If you open multiple Compare windows, they are displayed by default as individually resizeable child windows within the WinMerge window, like this:

Multiple Folder Compare windows: default display

Often, it's convenient to maximize your Compare window (by clicking its Maximixe button). The window then fills all the available space in the WinMerge window. The screen shot below shows a maximized Compare window.

Multiple Folder Compare windows: maximized

When you maximize one Compare window, any other Compare windows are hidden, as shown in the preceding screen shot. To access those windows, you could return to the default view by clicking the Restore button Restore button. A better solution is to enable tabs by setting (checking) View → Tab Bar.

When you display the Tab bar, each Compare window has a tab that shows the filenames of the two compared files. Now, you can easily identify and display any available Compare window, and the selected Compare window remains maximized:

Multiple Folder Compare windows: tabbed

4. File operations in Folder Compare

The Folder Compare window supports common operations on files, like editing, copying, deleting, moving, and renaming (moving is equivalent to a copy operation followed by a delete). You can use these file operations and some special WinMerge functions to merge the contents of folders. You can also open files using associated programs or external editors.

The most convenient way to perform most of these tasks is to right-click one or more items and use the context menu, where all file operations are available.

4.1. Copying files

The most common file operation in the Folder Compare window is copying files from side to side. There are several forms of the WinMerge copy function: all of them copy only files that are different, because copying identical files is of no use in merging. The copy functions are available in the context menu, in the WinMerge menu, and in the toolbar:

4.1.1. Context menu Copy shortcuts

In the Folder Compare window's context menu, the Copy item has a submenu with four shortcuts:

Folder Compare window Copy context menu

  • Left to Right and Right to Left copy the selection (or just the items in the selection that can be copied) from one side to the other. In the example, the suffix (2 of 4) indicates that only the two files that are different will be copied; the identical files will not. These shortcuts available only if any of the files you select is different: if you select only identical files, the shortcuts are unavailable.

  • Left to... and Right to... enable you to specify a copy target directory in your system, instead of a compared folder. When the Browse for Folder dialog opens, navigate to the target directory on your system (or create a new target folder) and click OK.

4.1.2. Toolbar and menu Copy commands

In the Folder Compare toolbar, Copy Right button Copy Right and Copy Left button Copy Left accomplish the same task as the Left to Right and Right to Left context menu shortcuts: they copy from side to side only files that are valid to copy. However, these commands do not directly display the number of files to be copied; instead, they display a confirmation dialog where you can check a list of source and target file paths.

In the WinMerge menu, Merge → Copy to Right and Merge → Copy to Left behave the same way as the toolbar Copy commands.

4.2. Deleting files

You can use the Delete context menu item to delete selected items in either or both sides. Like other file operations, Delete has a submenu with Left, Right, and Both shortcuts.

[Warning] Warning

We highly recommend that you keep the Send deleted files into Recycle Bin option enabled See Options and configuration), so that you can undo deletions in case of accidents. In addition, you should keep Recycle Bin enabled: the WinMerge option does not work if you disable the Recycle Bin in Windows. Again, you cannot undo file or folder deletion unless you use both the WinMerge Send deleted files into Recycle Bin option and the Windows Recycle Bin!

4.3. Renaming files

To rename a file or folder, choose Rename in its context menu or press F2. Then change the name in the edit box and press Return, or press Esc to cancel. You can only rename a single file or folder. Note that renaming changes items in both sides: it is not currently possible to rename an item on just one side.

4.4. Opening files

In the context menu, you can use either Open Left and Open Right, depending on which side you want to operate on. Each Open menu item has a submenu with these shortcuts:

with Registered Application

Opens the file with the application (if any) that is registered in Windows for the file's type.

[Tip] Tip

This shortcut usually opens a folder in a new Windows Explorer.

with External Editor

Opens the file with an external editor. The default editor is Notepad, but you can configure a different one in WinMerge options.

with...

Opens the Open With dialog, where you can specify an application to open your file with.

4.5. Copying pathnames or filenames

The context menu Copy Pathname and Copy Filenames shortcuts copy the pathname or filename of selected items to the Windows clipboard. You can then paste the copied information into a file or application, for example to create a list of changed files or a change log.

  • Copy Pathnames has a menu with three shortcuts, similar to other file operations. It copies the full pathnames of one or more selected items to the clipboard, one per line.

  • Copy Filenames copies only filenames without paths.

4.6. Protecting files

To protect the files and folders on either side of a compare from changes, enable the File → Left Read-only or File → Right Read-only check box.

[Important] Important

Setting the read-only option protects files and folders only in the current compare view; it does not affect their Windows file attributes.

This protected status is inherited by files that you open in the folder compare. For example, if you compare two folders, set one side read-only, and open two files for comparing, the open file on the protected side is write-protected. Similarly, you cannot copy a file from the unprotected side to the protected side.

The RO code in the left or right side's pane in the status bar (near the bottom right of the window) indicates that the side is currently read-only.

4.7. Refreshing selected items in the view

A full refresh of large folders can take a long time. In WinMerge 2.2 and earlier, you always had to do a full refresh to update files after editing them outside WinMerge. Starting in Version 2.4, WinMerge can refresh just selected items: choose Refresh from the context menu or View → Refresh Selected from the main menu.

4.8. Archiving files

Use the context menu Zip menu item to create a new archive file containing the items you select.

[Note] Note

Archive support requires that you have installed the WinMerge 7-Zip plugin.

The Zip menu item has a submenu with four shortcuts:

Left

Adds left-side files and folders recursively to the archive file

Right

Adds right-side files and folders recursively to the archive file

Both

Adds files and folders recursively from both sides to the archive file. Because the filenames are same, they are added to different subfolders, named Original and Altered, inside the archive: left-side files are put to Original, and right-side files are put into Altered.

Differences

Like Both, but adds only different files (including unique files) from both sides.

When you select one of the Zip shortcuts, the Save As dialog prompts you for the archive filename and type. WinMerge cannot add files to existing archive files: it always creates a new archive file.

[Tip] Tip

WinMerge can compare the contents of archive files that have the same name on both sides: WinMerge looks for the Original and Altered subfolders, and compares the contents of those two folders.

If a folder compare includes the contents of an archive file, any changes made to the included files in WinMerge (for example, using an Open file operation to edit the file) are saved in the archive file. But you cannot update archive contents by using the WinMerge Copy, Move, or Delete file operations. Instead, create a new archive file using one of the Zip shortcuts.

5. Browsing folders in the Folder Compare window

This section discusses ways to browse folders that are listed in a Compare Folder window. When you browse a folder, you perform a completely new compare operation. Its result overwrites the current result in the window.

5.1. Browsing folders in a nonrecursive compare

Even though a nonrecursive folder compare does not include the contents of subfolders, the subfolders themselves are listed as files in the result. Similarly, the compared folder's parent folder is listed as a file at the top of the table. By opening these folders directly in the Folder Compare window, you can selectively browse a directory tree. This approach — comparing just the subdirectories you are interested in — can be more efficient than performing a recursive compare on the entire directory tree.

Browsing the parent folder

To compare the [image] parent folder (the .. path at the top), double-click its row, or select the row and press Enter.

Sometimes the parent folder cannot be opened (for example if you do not have permissions to access it). These two icons indicate whether a parent folder can be opened:

Parent folder can be opened.
Parent folder cannot be opened.
Browsing a single subfolder that exists on both sides

To compare a single subfolder that exists on both sides, double-click the folder in the folder compare window.

Browsing a single subfolder that exists only one side

If you browse to a subfolder that exists only the left or right side, WinMerge can create a new, matching folder on the other side. See Browsing unique folders for details.

Browsing two different subfolders

You cannot compare two subfolders (that is, selecting two rows) where the subfolders on each side are different. Only if you have previously compared identical folders (for example, by browsing a single subfolder in a compare result) can you compare two subfolders. First select the two folders in the Folder Compare window, as shown in the following figure:

Folder Compare window, two folders selected

The order of selection is significant: the folder you select first is the left folder in the result; the second selected folder becomes the right folder in the result.

With the two folders selected, right-click and choose Compare (or click Merge → Compare in the menu).

[Tip] Tip

Again, the Compare operation is available only when the current left and right folder paths are identical in the Folder Compare window, as shown in the preceding screen shot. For example, it is not available if the current window compares two different folders.

5.2. Browsing unique folders

In WinMerge 2.6 and earlier, you could not browse to unique folders (folders that exist only in one side of a compare result), because WinMerge cannot compare an existing folder to a non-existing folder. To copy anything from a unique folder in WinMerge, you had to first create a copy of the entire folder structure.

However, you might prefer not to copy the whole folder structure. Starting in Version 2.8, WinMerge provides an alternate way to create a new, empty folder instead. This enables you to copy just the elements you want from the original, unique folder to the created empty folder. This procedure demonstrates:

  1. Browse to the unique folder (select the folder and press Enter, double-click it, or right-click it and choose Compare). For example:

    Folder Compare window, comparing unique folder

    A WinMerge message informs you that the folder exists on only one side and cannot be opened. The message then prompts you to confirm whether you want to create a matching folder and open it as the other side of the compare result.

  2. Click Yes to confirm (No cancels the compare). In the new compare result, the unique folder is opened on the left side, and the new empty created folder is on the right:

    Folder Compare window after browsing to unique and created folders

    In the compare result, you can copy or move items (for example, using the right-click context menu) from the unique folder to the created folder.

6. Customizing the Folder Compare window

This section describes how to control the way Folder Compare window displays results. You can customize the view by showing, hiding, and reordering the table columns.

6.1. Showing and hiding types of files

The View menu contains these shortcuts to show or hide types of items. Enable (check) a menu option to show the item; disable it to hide the item.

  • Show Identical Items: Files detected as identical

  • Show Different Items: Files detected as different

  • Show Left Unique Items: Files and directories present only in left side

  • Show Right Unique Items: Files and directories present only in right side

  • Show Skipped Items: Files and directories omitted by file filters

  • Show Binary Files: Files detected as binaries

6.2. Changing column sorting

The rows in the Folder Compare window are ordered according to the sort order of a particular column. This sort column is indicated by a small arrow in its heading. The arrow points up if the column is sorted in ascending order, down if descending. The Folder Compare example at the top of this topic is sorted by the Filename column, in ascending order.

To choose another order column, simply click in that column's heading. The selected column is set to its default sort order and all the rows are reordered by that column's sort order.

To change the sort direction of a column that is already the sort column, click in its header again. That is, clicking in a sort column header reverses its order (toggling between ascending and descending order).

6.3. Adding, removing, and reordering columns

To modify the columns that are displayed in the Folder Compare window:

  1. Right-click any column heading and choose Customize Columns.

  2. The Display Columns dialog contains a list of all the available column names, each with a check box. Configure the columns using any combination of these actions:

    • Check the columns you want to display (note that selecting the item in the list is not enough)

    • Uncheck the columns you want to hide.

    • To change the order of columns, select one or more items and click Move Up or Move Down.

    • Click Defaults if you want to restore the default WinMerge column configuration, overriding your custom configuration.

  3. Click OK.

The following columns in the Display Columns dialog are displayed by default in the Folder Compare window:

  • Filename (default): Name of compared item. In a nonrecursive compare, this column includes both files and folders; in a recursive compare, it does not include folders: instead, folders are listed in the Folder column.

  • Folder: Path of compared subfolder, relative to the compared folder. For a nonrecursive compare this column is always empty: folders are listed in the Filename column instead.

  • Comparison result: Verbose comparison result (see also Short Result).

  • Left Date, Right Date: Modification dates of item in each side. The newer of the two dates (or the date for any unique item) is prefixed with an asterisk ( * ).

  • Extension: File extension, handy for sorting.

The following additional columns are available in the Display Columns dialog:

  • Short Result: Displays the Comparison result column in a brief (Right only) form.

  • Binary: Column contains an asterisk ( * ) when the file is a binary file. This is handy for sorting and for use with the Short Result column.

  • Left Attributes, Right Attributes: Shows file attributes.

  • Left Creation Time, Right Creation Time: Item creation time.

  • Left Encoding, Right Encoding: File encoding. Shows the codepage number for ANSI files and Unicode encoding for Unicode files.

  • Left File Version, Right File Version: Version number from the file, if present. Note that the version is read only for some binary file types known to usually have a version resource.

  • Left Size, Right Size: File size in bytes.

  • Left Size (Short), Right Size (Short): Shorter versions of file sizes, rounded to KB, MB, or GB.

  • Newer File: Shows which side is newer.

  • Differences: Number of differences found between files, excluding possibly ignored differences.

  • Ignored Diff: Number of ignored differences within files. These are differences ignored by line filters.

  • Left EOL, Right EOL: Shows the EOL (linefeed) style of files.

6.4. Hiding items

You can quickly hide one or more selected items by using the Hide Items context menu shortcut. The items remain hidden until you refresh the view (press F5) or click View → Show Hidden Items.

[Tip] Tip

Get to know Hide Items: it can save you a lot of time by eliminating items that you already handled, or that are not currently of interest, from the view. For example, you might hide files after merging them, making it easier to see what items are left to merge.


Comparing and merging files

This topic describes how to use the WinMerge File Compare window to compare and merge files. To understand the basic concepts about differences used here, we suggest you read Overview of file comparing and merging first.

[Note] Important note for ANSI WinMerge users

In the ANSI version of WinMerge (WinMerge.exe) that is typically installed on older versions of windows, comparisons are set by default to use the default Windows ANSI codepages on your system - for example, Windows-1252 on many Western European systems). If the files you are comparing all use this format, the default settings are fine.

However, if you plan to compare files with different encodings (for example, UTF or another Windows codepage), you might need to change the default codepage settings, as described in Codepage options. If you are running the Unicode version of WinMerge (WinMergeU.exe), comparisons handle different encodings transparently, and so codepage settings do not affect you.

1. Starting a file compare operation

You can start a file compare operation from either the WinMerge window or a Command Prompt window.

From the WinMerge window

Click File → Open. Use the Select Files or Folders dialog to specify the left and right source files to compare. For more details about the Select Files or Folder dialog, see Opening files and folders.

From a Command Prompt window

Run WinMergeU.exe, which is in your WinMerge install directory. In your command arguments, include the left and right files to compare. For more information about using the command line, see Command line.

2. File Compare window

The File Compare window displays compared files in two File panes, side by side. The WinMerge toolbar and context menu provides functions for viewing, navigating, and merging differences. The screen shot below shows a comparison of two versions of a file.

File Compare Window

2.1. File panes

The left and right File panes show the text contents and differences of the two files being compared. The File panes are the main area for navigating and merging differences, and also allow you to edit the text directly. This section describes the features that support these actions, and ways that you can customize the File panes.

2.1.1. File pane header

The header at the top of each File pane shows the full path of the source file. The left and right file names are also identified in the header of the Compare Window, above the File panes.

One of the File panes is always active (indicated by the dark header background); the other is inactive and has a lighter header bar. You can edit only in the active pane (as described in File pane editing features). Click in either side to make it active and make the other side inactive.

An asterisk (*) before the filename in the header indicates that there are unsaved changes in the file.

The header bar's context menu has shortcuts that are useful for copying and pasting file information:

Copy Full Path

Copies the full path of the source file into the system clipboard.

Copy Filename

Copies just the source filename into the system clipboard.

2.1.2. Difference colors in File panes

Unless your files are identical, the content of the File panes includes some differences. Difference blocks are marked with background colors, which you can configure in WinMerge options. The basic difference color is dark yellow, by default. When selected, the difference color is red. Identical lines (like the second line in the preceding screen shot) have white backgrounds.

WinMerge inserts one or more gray blank lines in one version of a difference when the other version has more lines. These empty lines (which change from gray to light red when the difference is selected) do not represent blank lines in the source file; they are only placeholders in the display. The purpose of placeholder lines is to keep the left and right versions of differences vertically aligned.

By default, different words within difference lines are also marked with a background color. You can disable this coloring, or (for even more granular highlighting) add character-level difference coloring. Both are controlled by the Line Difference Coloring settings in the Editing page of WinMerge options. To change the various difference colors used, edit the values in the Colors page of WinMerge options.

2.1.3. File pane editing features

Although WinMerge is a not a full-featured editor or IDE, it does provide basic editing functions, like Undo and Redo, Find and Replace, and Goto. These basic editing tasks are often needed during merging (for example, to change text within differences). You can edit in the active File pane (remember, click in a pane to make it active). Changes are not written to a file until you save a pane to a result file.

WinMerge editing features also include syntax highlighting. This optional feature supports several file formats, and you can configure the colors used. Note that syntax highlighting is not applied within differences, as the preceding screen shot shows.

[Tip] Tip

Make sure that Automatic rescan is enabled, as described in Rescanning files. If it is not, manually refresh your view (press F5) before and after editing a file, to ensure that WinMerge difference detection is up to date.

2.1.4. File pane fonts

You can choose fonts for the File pane by clicking View → Select Font. WinMerge supports only fixed width fonts.

Here are font suggestions for using WinMerge with East Asian languages:

  • Simplified Chinese: SimSun or SimHei fixed-width fonts
  • Traditional Chinese: MingLiU fixed-width font
  • Japanese: MS Gothic or MS Mincho fixed-width fonts
  • Korean: GulimChe fixed-width font (not Gulim, because this variant uses proportional-spacing glyphs that are not centered in grid cells and poorly aligned in fixed-width mode).

2.1.5. File pane margins

The File panes have optional gray margins that show line numbers and some symbols. To show or hide the margins, clicking View → View Margins. If you are using multiple File Compare windows, you can control margins for each window independently. The margin can show any or all of these features:

  • Line numbers, if View → View Line Numbers is enabled.

  • Bookmarks, if Edit → Bookmarks is enabled. A bookmark is a blue circle, in the margin next to a line, that you can make WinMerge remember and return to.

    • To set a bookmark on a line, double-click in its margin (or press (Ctrl+F2). The same action deletes an existing bookmark.

    • To navigate bookmarks, click Edit → Bookmarks and choose Next or Previous.

    • Double-click a single bookmark to delete it (or press (Ctrl+F2).

    • Click Edit → Bookmarks → Clear All Bookmarks to delete all bookmarks.

  • Word wrap arrow symbols, if View → Wrap Lines is enabled.

The following screen shot shows a margin with bookmarks and word wrap enabled. Without line numbers, the margin width is minimal.

File Compare window margin with bookmark and word wrap

The next screen shot shows a margin with bookmarks and line numbers enabled. Notice that the margin is wider. In fact, the margin is wide enough for the largest line number. Thus, the margins for large files with many lines can be quite wide.

File Compare window margin with bookmark and line numbers

2.2. Toolbar and menus

The WinMerge toolbar and menus provide a range of functions to navigate, select, and merge differences within files.

[Note] Note

WinMerge shortcuts have the same names and buttons whether you open a Folder Compare or File Compare window. However, the functions behave differently: with a File Compare window, the functions operate on differences within files, not on differences within folders.

The difference functions you can use depend on your context, which often changes as you work. This means that a function is available only when its operation is possible for a given location or other condition in your WinMerge environment. For example, if you click in a line of text within a difference, you might notice several navigation and merge buttons become enabled in the toolbar. If you click in another area of text that is not within a difference, these functions become unavailable.

Difference functions are available in the WinMerge toolbar,and also through these alternate mechanisms:

  • WinMerge menus, especially Merge

  • Context menus within the File Compare window (when you right-click in text)

  • Keyboard shortcuts

Difference functions are described in Navigating differences and Merging differences, later in this topic. Quick start and Overview of file comparing and merging provide examples of comparing and merging.

2.2.1. Merge Mode

File+Merge Mode restores these WinMerge 1.7.1 single keyboard shortcuts for difference merging and navigating functions:

  • Up and Down keys for the Previous Difference and Next Difference functions.
  • Left and Right keys for the Copy Left and Copy Right functions.

Merge mode omits the Alt key for these common operations (making them quicker to use than the normal mode). Note that the Shift and Alt Arrow key combinations work in merge mode in the same way as normal mode.

Merge mode is indicated in the status bar by the text, Merge.

2.3. Location pane

The Location pane, to the left of the File panes, maps the entire length of the compared files into two vertical bars (corresponding to the left and right File panes). It is especially useful for working with files that are too long to easily navigate in the File panes.

The Location pane shows several kinds of items:

Location pane diff lines Difference blocks

Each difference block in the File panes is indicated in the Location pane by a horizontal line across each vertical bar. The thickness, color , and locations of these lines are clues about of the size (number of lines), types and distribution of all differences in the files. For example, the color of a line is the same as the color of the corresponding difference block. The Location pane in the preceding screen shot shows many basic differences (gold) and some empty difference blocks (gray).

Location pane current diff pointer Current difference

If you have selected a difference, the Location pane marks the current difference line with a pair of small triangles on either side of the vertical bars. If you navigate to another difference, the pointer moves up or down with the location. Scrolling the File pane does not change the location of the difference pointer (or any of the difference lines) in the location pane.

Location pane view area bar View area

The area of the files currently visible in the File panes is indicated by a shaded (translucent) view bar over the Location pane. The area bar's height and location correspond to the portion of the files that is visible in the scroll region. For example, you might see the bar expand or shrink if you change the height of your File panes. This synchronization of the Location pane view bar and File panes enables quick navigation, and some useful actions:

  • When you scroll the File panes, the view area in the Location pane moves with it.

  • Conversely, you can drag the view area bar in the Location pane up or down to scroll the File panes. This scrollbar thumb action is very handy for navigating long files.

  • Click anywhere in the Location pane to jump to the corresponding location in the File panes.

Moved differences

The Location pane can indicate difference blocks that are moved. Moved blocks are two sides of a difference that are in different locations. Moved blocks are indicated by the Moved and Selected Moved difference colors (configurable in WinMerge Options) and by lines connecting their locations in the left and right location bars. For example:

Location pane with moved diff

Showing moved blocks can make it easier to visualize changes in files. However, if there are too many moved lines it can appear cluttered. Use your own judgement!

The Location pane's context menu contains these shortcuts:

  • Goto Line 1: Moves the cursor to the top of the file.

  • Goto: Moves the cursor to a line you specify (described in Navigation functions).

  • No Moved Blocks: Turns off moved difference color for moved blocks.

  • All Moved Blocks: Turns on moved difference color for all moved blocks.

  • Moved Block for Current Diff: Turns on moved difference color only for current selected moved difference.

2.4. Diff pane

The Diff pane shows the contents of the two sides of a selected difference.

When you select a difference, the two versions are loaded in the upper and lower sides of the Diff pane. In this way, the Diff pane confirms which lines are included in a difference, and lets you examine them in isolation from the rest of the file.

You can merge differences directly in the Diff pane by right-clicking in either the top or bottom side and choosing Copy to Right or Copy to Left.

2.5. Status bars

Each File pane contains a status bar at the bottom. The status bar contains several panes with different types of information about the document and your location in it:

Line status

  • Ln: Line number in the source file.

  • Col: Column location of the cursor and the total number of columns in the line.

    Col counts tabs as n spaces, where n is the number of characters defined as the Tab size in the Editor page of WinMerge options (4 by default).

  • Ch: Character location of cursor and the total number of chars in the line.

    Ch counts tabs as single tab characters.

  • EOL: Linefeed style of the current line (shown only when the Preserve original EOL chars option is enabled in the Editor page of WinMerge options).

Read-only status

RO is shown in the pane if the file is set to read-only (as described in Protecting files). Otherwise the pane is empty.

File encoding

Codepage number for ANSI files, Unicode encoding type for Unicode files.

EOL style

EOL style of the file: Win for Windows/DOS files (CRLF), Unix (LF), Mac (CR), or Mixed.

[Note] Note

When the per-line EOL style is used, the file EOL style is not shown (this pane is blank).

When a File Compare window is open, the WinMerge window status bar shows one of these messages about the compared files:

  • Identical: The files contain no differences

  • n Differences Found: The number of differences detected, displayed only when no difference is selected.

  • Difference x of n: The selected difference's sequence number in the total number of differences, starting with 1.

2.6. Working with multiple File Compare windows

By default, the WinMerge window displays a single File Compare window. If you start another file comparison (by clicking File → Open and selecting another pair of files) while a File Compare window is currently open, the current File Compare window is closed, unless WinMerge detects unsaved changes in the left or right file. If you have modified either file, WinMerge prompts you to save or discard your changes before opening a new File Compare window.

For example, in the next screen shot WinMerge gives you a chance to save changes detected in the right side file:

Save modifed files? dialog

If you plan to work with multiple compare operations simultaneously, consider setting (checking) the Enable multiple compare windows for File compare option, which is disabled by default. With this option enabled, you can open multiple File Compare windows without the intervening Save step.

2.7. Using tabs with maximized Compare windows

By default, Compare windows are displayed as individually resizeable child windows within the WinMerge window, like this:

Multiple File Compare windows: default display

If you maximize your Compare window (by clicking its Maximixe button), the window fills all the available space in the WinMerge window, giving you the most room possible to work in. However, if you are working with multiple Compare windows, only one one maximized window is visible: any others are hidden. The screen shot below shows the header area of a maximized Compare window:

Multiple File Compare windows: maximized

To access other Compare windows, you could return to the default view by clicking the Restore button Restore button. But a better solution is to enable tabs by setting (checking) View → Tab Bar.

When you display the Tab bar, each Compare window has a tab that shows the filenames of the two compared files. Now, you can easily identify the available Compare windows. To open any of them, just click its tab:

Multiple File Compare windows: tabbed

3. Navigating differences

This section describes how to navigate and select differences in the File Compare window. Note that when you select a difference, it is always selected in both File panes.

[Tip] Tip

To save time, enable Automatically scroll to first difference in the General page of WinMerge options. Then you don't have to manually navigate to the first difference and select it.

3.1. Navigation functions

Here are the functions for navigating differences in the File Compare window, and their shortcuts in the toolbar and menus:

Difference in the Current Line/Select Line Difference

Shortcuts: Difference in the Current Line button button, Edit → Select Line Difference, F4, context menu in File pane within a difference.

Enabled if you have clicked in (or selected) text within a difference in a File pane. Selects the word differences within the line. For example:

Select Line Difference example

If you want to select the difference block itself, use Current Difference instead.

Next Difference

Shortcuts: Next Difference button button, Merge → Next Difference, Alt+Down (or Down in merge mode).

Selects the next difference below your current cursor location in the document (not necessarily relative to the current difference). Use to step through differences sequentially from any point. Available except when the last difference is currently selected.

Previous Difference

Shortcuts: Previous Difference button button, Merge → Previous Difference, Alt+Up (or Up in merge mode).

Selects the previous difference above your current cursor location (not necessarily relative to the current difference). Use to step backwards sequentially through differences. Available except when the first difference is currently selected.

First Difference

Shortcuts: First Difference button button, Merge → First Difference, Alt+Home.

Use this to begin comparing or merging differences, or to locate the first difference from any other location. Available except when the first difference is currently selected. You can also select a difference by double-clicking its text.

Current Difference

Shortcuts: Current Difference button button, Merge → Current Difference, Alt+Enter.

This function has two modes of action:

  • If your cursor is inside a difference but no difference is selected, this function selects the entire difference. This is a very handy way to select a difference using the keyboard.
  • When there is a current difference, the function jumps to that location. This is handy if you have scrolled the selected difference out of view, and want to quickly return to its location.
Last Difference (Alt+End)

Shortcuts: Last Difference button button, Merge → Last Difference, Alt+End.

Enabled except when the last difference is currently selected.

Go To

Shortcuts: Edit → Go to, Ctrl+G, context menu in File pane and Location pane.

Enables you to jump to either a line number or a difference number (for example, difference 2 is the second difference). Opens the Go To dialog, where you specify the number, which file to use (either the left or right), and the type of location (either line or difference).

[Tip] Tip

The Go To line number can be useful when you need to merge the same change from one file to several target files. Jumping to a particular difference can be quicker than using Find to search text, or stepping through differences.

Refresh

See Merge functions.

4. Merging differences

Merging differences amounts to copying them from one File pane to the other: either left to right, or right to left. This is different from directly editing text using WinMerge's editing functions (described earlier in this topic).

4.1. Rescanning files

By default, the Automatic rescan option is enabled in the Editor page of WinMerge options. WinMerge rescans your files after every change to update its difference mapping. Without rescanning, WinMerge differences might not be synchronized with the current content of the files, causing unpredictable merge results.

[Note] Note

Rescanning does not reload files. Therefore, if an external program has updated a file, those changes are not seen in WinMerge: only changes made in WinMerge are used to update differences.

[Important] Important

If Automatic rescan is disabled, we strongly advise that you run Refresh before performing any merge operation: click Edit → Refresh or the Refresh button toolbar button, or press F5.

If a merge result looks incorrect, click Edit → Undo or press Ctrl+Z to undo the merge. Then rescan the files and try merging again.

4.2. Merge functions

The merging functions can implicitly select differences based on a cursor location or text selection. For example, if you click anywhere in a difference and then click the Copy Right toolbar button, the entire difference block is merged. This makes it easy to merge many small differences. Similarly, if you select text that spans all or part of multiple differences, all the included differences are merged with a single merge command.

If the result of a merge operation is not what you expected, you can click Undo to reverse the operation.

Here are the merge functions and their shortcuts in the toolbar and menus:

Copy Right

Shortcuts: Copy Right button button, Merge → Copy to Right, Alt+Right ( or Right in merge mode), context menu in File pane within a difference, and in Diff pane.

Copies one or more difference from left to right. Note that differences do not need to be fully selected: At its simplest, this means replacing text in the target difference with text in source difference. But because differences can also contain empty lines, new lines may be created or removed.

Copy Left

Shortcuts: Copy Left button button, Merge → Copy to Left, Alt+Left (or Left in merge mode), context menu in File pane within a difference, and in Diff pane.

Copies the current difference from the right to the left File pane. See Copy Right description for details.

Copy Right and Advance

Shortcuts: Copy Right and Advance button button, Merge → Copy to Left, Ctrl+Alt+Right, context menu in File pane within a difference.

Merges the current difference from the right to the left File pane, then selects the next difference (if one exists). Equivalent to Copy Right and Next Difference in one step.

Copy Left and Advance

Shortcuts: Copy Left and Advance button button, Merge → Copy to Left, Ctrl+Alt+Left, context menu in File pane within a difference.

Merges the current difference from left to right, then selects the next difference (if one exists). Equivalent to Copy Left and Next Difference in one step.

All Right

Shortcuts: All Right button button, Merge → Copy to Left, Alt+Left, context menu in File pane within a difference.

Copies all differences from the left to the right File pane. Use to synchronize two files with one command. Similarly, you can back out the entire merge by clicking the Refresh button Undo or pressing Ctrl+Z.

All Left

Shortcuts: All Left button button, Merge → Copy to Left, Alt+Left, context menu in File pane within a difference.

Copies all differences from the right to the left File pane. Effectively, replaces the content of the left File pane. See similar to All Right.

Refresh

Shortcuts: Refresh button button, View → Refresh, F5.

Rescans files to update differences. Use after changes are made to files, if automatic scanning is disabled (see Rescanning files for details).

4.3. Resolving conflict files

You can use WinMerge to resolve conflict files that some version control systems produce during their merge operations. A conflict file is created when a merge encounters differences that cannot be automatically resolved. It is a single file containing the incompletely merged content of the two files. WinMerge separates the conflict file into separate files and opens those files in file Compare window. You can then use WinMerge's compare and merge functions to resolve the conflicts and save the merged result file.

  1. Click File → Open Conflict File, and use the Open dialog to select the conflict file in your file system. The conflict file opens in the File Compare window:

    • The left File pane file header is titled, Theirs File. This side represents the file that is usually in the version control system's repository. This file usually cannot be edited, so WinMerge sets the left File pane to be read-only. This means that differences can be merged only from this file to the other file.

    • The right File pane is titled, Mine File. This side is the working copy of the file. All changes should be done to this file, which is the result file.

      The Mine File side is set to modified after opening conflict file (you will notice the asterisk in the File pane header). This allows you to save the file quickly if the it does not require any changes. It also ensures that you do not forget to resolve the files. If you choose not to save the file, the original conflict file is not modified.

  2. Use all the normal compare and merge functions described earlier in this topic to resolve the conflicts in the Mine File pane.

  3. When you are done, click Ctrl+S to save the the Mine File side as the result file. By default, the new version overwrites the original conflict file. Alternatively, you can click File → Save Right → Save As, and choose a different file name.

Many version control systems allow you to configure an external merge tool. If yours does, you might be able to have your version control system launch WinMerge automatically when a merge conflict occurs.

You can also open a conflict file from the WinMerge command line, which accepts three filename parameters: Theirs, Mine, and optionally, Resolved (if you want a different result file from the conflict file). For more information, see Command line. Single path to the conflict file is also accepted in command line.


Options and configuration

The Options dialog enables you to customize many WinMerge features. To set WinMerge options:

  1. Click Edit → Options in the menu or the WinMerge Options button Options button in the toolbar.

    The Options dialog contains a number of pages, each containing a group of related options. You can open any page by clicking its title in the Categories list, on the left side of the dialog.

  2. Configure the options you want to change using one or both of these methods:

    • Directly in the options pages.

    • Importing an options .ini file that you exported previously (see Importing and Exporting options for details).

  3. When you have set all your options, click OK to save them and dismiss the dialog.

This topic describes the options in detail. There is a section for each page in the Options dialog.

1. Importing and Exporting options

If you change options frequently for different compare or merge scenarios, or if you want to share your settings with other WinMerge users, consider saving your settings by exporting them to an options file. Then, whenever you want to use those settings, you can simply import the options file instead of setting options manually.

To export options

When you have set your options the way you want them, click Export. In the Select file for export dialog, specify a path and name for your options file (the type ini is automatically appended), and click Save.

In the generated text ini file, each line contains a name-value pair that defines a single option.

To import options

When you want to reuse your saved options, click Import. In the Select file for import dialog, navigate to the saved ini file and click Open.

The values in your imported options file replace all existing settings.

2. General options

The General page has these options:

2.1. Automatically scroll to first difference

  • Disabled (default): Compare window opens to the top of the folder or file, with no difference selected.

  • Enabled: When it first opens, the Compare window selects the first difference, scrolling to the location if necessary.

    • For a folder compare, selects the first different file or folders.

    • For a file compare, selects the first difference block in the files.

2.2. Disable splash screen

  • Disabled (default): A splash screen is displayed when you start WinMerge. You can dismiss the screen at any time by clicking it; otherwise it is automatically dismissed after a few seconds.

  • Enabled: Completely omits the splash screen when you start WinMerge. Note that this does not make startup faster.

2.3. Close Windows with ESC

  • Enabled (default): Lets you use the ESC key to close WinMerge windows. Pressing ESC once closes one window, so with one File Compare window open, it takes three key presses to close WinMerge: first the File Compare window, then the Folder Compare window, and finally the WinMerge window.

    Note that in the WinMerge command line, the -e parameter enables you to close WinMerge by pressing ESC just once.

  • Disabled: Pressing ESC does not close any WinMerge windows.

2.4. Automatically verify paths in Open-dialog

  • Enabled (default): The Select Files or Folders dialog checks both paths as you enter them. The OK button remains disabled until both paths are validated. Note that this checking can cause some delay.

  • Disabled: The OK button in the Select Files or Folders dialog is always enabled, and attempts to open any paths you specify. Since there is no delay during validation, this can speed up the selection of paths. However, if the path cannot be opened, an error dialog is displayed.

2.5. Allow only one instance to run

  • Disabled (default): You can run multiple WinMerge instances. For example, if WinMerge is currently running and you click the WinMerge desktop shortcut, a new WinMerge window is opened.

  • Enabled: Limits the WinMerge program to one instance:

    • If WinMerge is currently running and you try to start a new instance, no new application window is opened: the current WinMerge window is used instead.

    • If you start a new instance with paths (for example on the command line), a new Compare window is opened in the existing WinMerge window.

Also see the related options under Enable multiple compare windows for.

2.6. Ask when closing multiple windows

  • Disabled (default): If you exit WinMerge while multiple Compare windows are open, WinMerge prompts you to confirm whether to close all the windows.

  • Enabled: If you click Exit and there are no pending file changes, WinMerge closes immediately.

2.7. Preserve file time in file compare

  • Disabled (default): If you save changes to a file in WinMerge, the timestamp of the file is updated.

  • Enabled: If you save changes to a file in WinMerge, the timestamp of the file is not changed in your file system.

2.8. Open-dialog Auto-Completion

Choose one of these options:

  • Disabled (default): No autocompletion is performed when you enter paths in the Select Files or Folders dialog.

  • From file system: Checks paths as you type. It attempts to locate paths in the file system that match the letters you type, and if a matching path is found, completes the path.

  • From MRU list: Checks paths only from the most recently used (MRU) list. This is handy when you have a limited set of paths to compare.

2.9. Enable multiple compare windows for

Controls whether WinMerge allows you to open single or multiple Compare windows. Specify the Folder compare and File compare options independently:

  • Disabled (default): You can only open one Folder compare or File compare window at a time.

  • Enabled: You can open multiple Folder or File compare windows simultaneously.

    [Note] Note

    File Compare windows are children of Folder Compare windows. Therefore, you can open one File Compare window for every Folder Compare window, even if the File compare option is disabled.

2.10. Reset

WinMerge allows you to suppress some common message boxes. For example, when two identical files are opened, the message box titled, The files are identical, is normally opened. If you don't want this box to display any more, you can enable (check) the option in that message box to not show the message again.

Later, you might decide that you want to see those messages again. If so, click the Reset button to make the message boxes display again.

[Note] Note

We recommend that you not suppress messages when updating WinMerge to a newer version. The installer enables their display automatically, but if you don't use the installer, then remember to enable message display by using the Reset button.

3. Compare options

The options in this page enable you to change some of the ways that WinMerge detects differences, such as comparing only file size, or ignoring some types of differences, like case.

[Important] Important

Customizing difference detection can be useful during comparisons, when you might not be interested in some differences. However, these options also affect merging. For example, if you ignore whitespace changes, then indentation changes in source code files are not preserved when you merge.

For this reason, before you merge any differences, we strongly recommend resetting the options on this page to their default settings, especially the ignore options. To reset all the options on this page, click the Defaults button.

3.1. About ignore options

A number of options in the Compare page (described later in this section) enable you to ignore certain differences. Ignored differences are treated in special ways in WinMerge:

  • They are marked with the Ignored Difference color.

  • Ignored differences cannot be merged

  • Ignored differences are not included in difference counts

  • Files containing only ignored differences are marked as identical in a folder comparison

3.2. Whitespace

Whitespace, the space between words and lines, is represented in text files by special, nonprinting characters like spaces, tabs, and linefeeds. The significance of whitespace varies a lot: spaces between words are usually important; in some text documents, indents and linefeeds are critical to meaning and readability; in structured code, linefeeds and tabs might be significant.

These whitespace options are available:

Compare

Default: All whitespace is compared. If you are not sure which option your document requires, this is the safest choice. In the example below, all lines are detected as different.

Example 1. Ignore whitespace change

One space between words:

Two Words

Two spaces between words:

Two  Words

Tab between words:

Two	Words

No spaces between words:

TwoWords

Ignore change

Compares differences in whitespace. In the preceding example, the first three lines have different whitespace, but are detected as identical: tabs and multiple are treated as if they are single space. The last line has no whitespace, so the difference is not ignored (in effect, the words in the last two lines are different):

Ignore all

Ignores all whitespace characters, except linefeeds (so lines are detected, and preserved in a merge). All lines in the preceding example are detected as identical.

3.3. Ignore blank lines

  • Disabled (default): Empty lines in the source files are detected and represented in the File Compare window as blank lines with the Deleted Difference colors.

  • Enabled: Empty lines in the source files are ignored. They are represented in the File Compare window as blank lines with the Ignored Difference colors. However the difference cannot be merged.

3.4. Ignore case

  • Disabled (default): Comparisons are case-sensitive. For example, LowerCase, LOWERCASE, and lowercase are all different.

  • Enabled: Differences between lowercase and uppercase letters are ignored.

3.5. Ignore carriage return differences (Windows/Unix/Mac)

  • Disabled (default): WinMerge detects end of line (EOL) style differences. For example, if you compare two lines that have the same contents but different line endings, the lines are considered to be different. When this happens, WinMerge displays a dialog prompting you to confirm whether to detect or ignore the difference.

  • Enabled: EOL differences are ignored.

3.6. Enable moved block detection

  • Disabled (default): WinMerge does not detect when differences are due to moved lines.

  • Enabled: WinMerge tries to detect lines that are moved (in different locations in each file). Moved blocks are indicated by the Moved and Selected Moved difference colors. If the Location bar is displayed, corresponding difference locations in the left and right location bars are connected with a line. Showing moved blocks can make it easier to visualize changes in files, if there are not too many.

    For an example, see the Location pane description in Comparing and merging files.

3.7. Ignore time differences less than 3 seconds

  • Disabled (default): Files with different timestamps are detected as different.

  • Enabled: Sometimes (for example, when you use network shares) small differences in timestamps are not significant. To get more meaningful results in such situations, this option enables you to ignore time differences smaller than three seconds.

    This option works only with the Modified Date and Modified Date and Size compare methods (described in File Compare method). It has no effect with other methods.

    [Warning] Warning

    This option should be enabled only when the time difference is detected. Otherwise, it can cause incorrect compare results.

3.8. File Compare method

This option lets you determine how complete your file comparisons are. Choose one of these five choices:

Full Contents

Default: Full comparison of files by content, with all the bells and whistles. This method invokes plugins and uses the diffutils engine for fully accurate differencing and moved block detection. This is the most complete and recommended method.

Quick Contents

Slimmed-down comparison of files by content. This method uses streamlined file comparison code which skips plugins and moved block detection. This method is faster than Full Contents, because it does not load the files.

Its drawback is that line filters are not applied when comparing. For example, this method sees file as different even if line filters are set to ignore all differences in the files.

Modified Date

Compares only the modification dates on the files, so it is far faster than either of the contents methods. But obviously, it is only as accurate as the modification dates.

Modified Date and Size

Similar to Modified Date, but also checks file sizes when dates are identical.

Size

Compares only file sizes, so it is fast but not as accurate as the contents methods.

3.9. Stop after first difference

This option is enabled only when the Quick Contents compare method is selected.

  • Disabled (default): WinMerge examines all differences in the files.

  • Enabled: This option optimizes comparisons by examining files only until the first difference is found, instead always scanning the entire files.

    The drawback is that WinMerge may be unable to identify binary files as binary. This is likely to happen if the first difference is near the beginning of the file. If you know what kind of files you are comparing (for example, which are binary files), this option can be a good way to speed up comparisons. However, don't enable this option if you are not sure what kind of files you are comparing.

3.10. Filter Comments

  • Disabled (default): WinMerge compares comments in code, along with other content.

  • Enabled: This option optimizes comparisons by detecting comments in certain programming language file types (such as C++ and Java), and ignoring them.

    The recognized file types and their comment markers are defined in the file, IgnoreSectionMarkers.ini, at the top of the WinMerge installation directory.

4. Editor options

4.1. Syntax highlighting

  • Enabled (default): WinMerge can syntax highlight many programming language and web formats. To see the formats that are supported by default, click View → Syntax Highlight.

  • Disabled: Syntax highlighting consumes some processing power, so if WinMerge screen updating seems to be slow, turning off this option might help.

4.2. Automatic rescan

  • Disabled (default): WinMerge rescans automatically when you merge a difference, or if you manually rescan (for example, click the Rescan button).

  • Enabled: Forces WinMerge to rescan after every edit event (a change to files, like typing).

    [Note] Note

    To avoid slowing down your editing, WinMerge delays automatic rescanning a little: it waits one second after each edit event. Because each new edit event resets the timer, no rescans occur until you pause or stop editing.

4.3. Preserve original EOL chars

  • Disabled (default): Assumes that files are meant to be Windows files. If a file does not use the standard Windows line ending, WinMerge considers this to be an error. It silently changes the line endings to the Windows style instead of detecting them as differences. Thus, the File Compare window status bar shows the EOL style as Win.

    For most situations, you should leave this option disabled: this default behavior works even when comparing two files that have different line ending styles.

  • Enabled: Prevents WinMerge from automatically changing line endings, so that it detects different EOL styles for every line. This might be useful for handling files from systems with different EOL styles (for example, Windows and Unix).

    [Important] Important

    This is an advanced option for users who are familiar with EOL bytes and who want to compare files with different EOL styles inside one file. We recommend that you not enable this option unless you need this advanced functionality. Remember, this option is not required to compare two files with different EOL styles.

4.4. Tab options

Tab size

Width of a tab space. Specify a value n : the resulting width is equivalent to that of n characters. Default: 4. The maximum value is 64.

Tab insert options

Determines what kind of character is used when you insert a tab in text. Only one of these options can be enabled:

  • Insert Tabs (default): Uses a single tab character.

  • Insert Spaces: Uses one or more spaces (determined by the Tab size) instead of a tab character. For example, with the default tab size, four spaces are inserted.

4.5. View line differences

WinMerge can highlight not only different lines, but also differences within lines. You can enable and disable line difference coloring using either the View Line Differences option in this page, or by clicking View → View Line Differences. For example, when the menu item is checked, the option in this page is also checked, and changing either setting automatically changes the other.

However, View Line Differences and the options under it give you control over exactly what kinds of differences are detected within lines:

  • Enabled (default): WinMerge highlights differences within lines (also enables the View → View Line Differences menu item).

    When this option is enabled, you can choose one of these suboptions. The best choice usually depends on the file types you are comparing:

    • Character level: Detects individual characters that are different. This option can be useful for file formats that do not have clear word breaks, or if you are looking for single-character differences. For example, this level makes it easy to spot a single changed character in the middle of a word.

    • Word-level (default): Detects words that are different. Possible advantage: making it easy to copy and paste words.

      • Break at whitespace (default): Words are assumed to be separated by whitespace characters. This usually works for typical text files.

        For example, these two lines contain punctuation but no whitespace. So, with the Break at whitespace option, WinMerge detects no word breaks. Instead, it highlights the text as a single word-level line difference.

        10,20,30,40,50
        10,25,30,45,50

      • Break at whitespace or punctuation: Considers both whitespace and punctuation characters to be word breaks. This is useful for handling lists that are separated with punctuation (like comma-separated lists). In the preceding example, WinMerge highlights only 20 and 40 in the first line, and 25 and 45 in the second line.

  • Disabled: WinMerge does not highlight differences within lines, and all settings for the level and whitespace options are ignored (also disables the View → View Line Differences menu item).

5. Colors options

Use this page if you want to change any of the difference colors used in the File Compare window. You can set the background, deleted, and text color.

To change a color, click in its box to open a standard Color chooser dialog. Choose one of the predefined colors or define your own custom color, then click OK to load the new color in the box.

At any time, you can click Defaults to reload the installed color scheme.

6. Text Colors options

Use this page to change the colors used for text. First, check the option, Use customized text colors. This activates the text options. There is an option for three kinds of text: whitespace, regular text, and selected text. For each kind of text , you can choose a color for the background and the text.

7. Syntax Colors options

By default, the WinMerge File Compare window marks the syntax of certain kinds of source code, as described in Syntax highlighting. This page lists the syntax elements that are recognized, and enables you to change their text color and weight.

At any time, you can click Defaults to reload the installed color scheme.

8. Archive Support

This page contains options for configuring Winzip archive support using 7-Zip.

8.1. Download 7-zip Plugin

If WinZip is already installed on your system, WinMerge automatically detects it, and you don't need to configure anything here. Otherwise, you can click this link to open the WinMerge downloads page in your Web browser. There, you can download the 7-Zip Plugin installer (and other WinMerge files). To install the plugin, see 7-Zip and archive support. Remember to close WinMerge before running the 7-Zip installer.

8.2. Enable archive file support

This option controls how WinMerge handles archive files (based on 7-Zip integration).

  • Enabled (default): WinMerge recognizes 7-Zip archives.

    WinMerge can access 7-Zip from two installation sources. If you specified one of these methods earlier (for example, during the WinMerge installation), you can change it here:

    • Use stand-alone 7-Zip if available

    • Use local 7-Zip from WinMerge folder

  • Disabled: Turns off 7-Zip archive integration.

8.3. Detect archive type from file signature

  • Disabled (default): WinMerge recognizes only archives whose file extension is known on your system (for example, in the registry or through a file association).

  • Enabled: WinMerge can recognize archive files even if their file extension is not known. To recognize an archive, WinMerge searches the beginning of the file for the archive signature bytes.

    [Tip] Tip

    You can use this option to enable WinMerge to recognize Open Office files.

9. System options

9.1. Send deleted files to Recycle Bin

  • Enabled (default): Files and folders that you delete in a Folder Compare window are moved to the Recycle Bin, if it is available.

    [Important] Important

    Remember: if the Recycle Bin on your system has been deactivated, this option does not work, and deleted files are lost!

  • Disabled: Files and folders deleted in a directory compare actually deleted.

9.2. Add to explorer context menu

  • Enabled (default): Adds one or more WinMerge shortcuts to the Windows Explorer context menu. After right-clicking one or more files or folders, choose a WinMerge shortcut to open the items in a WinMerge compare window.

    Two additional options are available if you use this integration. Neither option is enabled by default, but you can enable one or both:

    Enable advanced menu

    • Disabled (default): The WinMerge shortcut is included in the Windows Explorer context menu when you right-click one or more files or folders. If you select a single item, the Select Files or Folders dialog opens. If you select two items, they are opened directly in a Compare window.

    • Enabled: Replaces the WinMerge shortcut in the Explorer context menu with Compare shortcuts, described in Shell integration. The Compare shortcuts enable you to add a selected path to memory, then choose the second separately (for example, in a different Explorer view).

    Include subfolders by default

    • Disabled (default): When you use the WinMerge or Compare shortcut, only the top level of files is selected: the compare operation is non-recursive.

    • Enabled: The selection includes subfolders, making the compare operation recursive.

      Another way to include subfolders is to press Control while selecting the WinMerge or Compare shortcut in the Windows Explorer context menu.

  • Disabled: The WinMerge shortcut is unavailable in Windows Explorer.

9.3. External editor

The WinMerge File Compare window provides common editing functions. If you prefer using your favorite, full-featured editor, you can configure WinMerge to open an external editor from the Folder Compare context menu.

By default, Notepad is configured as the default external editor, because it is found on all Windows systems. To configure a different external editor, enter the full path to its executable file.

[Tip] Tip

Along with the path, you can include any command line parameters supported by the external tool, in this format: path to executable -option1 -option2 ...

To use the configured external editor, right-click a file in the Folder Compare window and choose Open Left → with External Editor or Open Right → with External Editor.

9.4. Filter Folder

Use this field to specify your own private folder for file filters. By default this folder is your user profile directory (for example, My Documents on Windows XP, or Documents on Windows Vista). When you create a file filter, it is automatically added to this folder.

9.5. Temporary files folder

Specify the folder where WinMerge stores temporary files. Either one of these options is available:

  • System's temp folder (default): For example, this might be C:\Windows\Temp on your system.

  • Custom folder: Click Browse and select a different folder where you have write access.

10. Backup Files

This page allows you to control how WinMerge creates backup files.

10.1. Create backup files in

Specify when WinMerge should create backup files. You can enable or disable each of these options independently:

  • Folder compare (disabled by default): Backup files are create whenever files are overwritten (copied).

  • File compare (enabled by default): Backup files are created whenever files are saved.

10.2. Create backup files into

Specify where backup files are created. Only one of these options can be enabled:

  • Original file's folder (enabled by default): Backup files are created in the same folder as the source file. This is usually a good choice. The down side is that cleaning up backup files in big folders can take a lot of work.

  • Global backup folder (disabled by default): All backup files are created in one global folder. This makes them easy to clean up. But, if there are multiple source files with same file name, then the most recent backup file overwrites the previous one of the same name.

10.3. Backup filename

When WinMerge creates a backup file, it appends an extension to the source file name. You can choose either or both of these extension schemes:

  • Append .bak -extension (enabled by default): For example, the file.txt is backed up to file.txt.bak.

  • File compare (enabled by default): Timestamps are almost always unique, so this option usually avoids duplicating backup file names when the source files have the same names.

    Also, storing a copy of a file each time you save it provides a way to track changes to the file. However, you should consider that this option can create a lot of files.

11. Version Control options

Use this page to configure or disable the WinMerge integration with a supported versioning system.

Choose one of these options:

  • None (default)

  • Visual SourceSafe (less than 5.0)

    Also enter the path to SS.EXE.

  • Visual SourceSafe (5.0 and above)

  • Rational ClearCase

    Also enter the path to cleartool.exe.

12. Codepage options

This page allows you to specify the codepage that the ANSI version of WinMerge uses for ANSI files. , and whether the codepage of certain file formats should be detected from the contents of the files.

[Important] Important

The ANSI version of WinMerge (WinMerge.exe) is normally installed only on Windows 9X and WME. On all other, newer Windows systems, the Unicode version (WinMergeU.exe) is installed. The Unicode version of WinMerge handles encoding transparently. You should not need to change any settings in this page unless you are running the ANSI version.

[Note] Note

A full explanation of text encoding and Windows codepages is beyond the scope of WinMerge documentation. Fortunately, there is lots of information about them on the Internet. For example, here are some places to start:

  • Wikipedia: Code pages, Character encoding

  • Microsoft: Code Pages Supported by Windows

12.1. Default codepage for ANSI files

Choose one of these radio buttons to set the default codepage that WinMerge uses when handling ANSI files:

  • System codepage (default):The codepage used by your Windows system. This default is usually the best choice. However if you know that you are comparing files that do not use the system codepage, consider one of the other options.

  • According to WinMerge User Interface: The encoding used by your installation of WinMerge.

  • Custom codepage: Enter the codepage number explicitly. For example, UTF-8 or ISO-8851-1.

12.2. Detect codepage info for these files: .html .rc .xml

[Important] Important

Uncheck this option in WinMerge.exe. Characters conversions can result in lossy conversions and the risk is very high. WinMerge.exe can display files only with your current codepage.

  • Disabled (default): WinMerge does not read codepage information from the source files. It uses the default codepage setting instead.

  • Enabled: WinMerge detects the codepage for these extensions : html, rc (resource files for VC++) and xml. The detected codepage overrides the setting for the default codepage option.

    This option is of interest when your documents use a codepage that is different from the codepage of your Windows configuration.

    For example, you might merge two Slovak or two Japanese files in an English environment. With this option enabled (and with the required fonts), your Slovak, or Japanese, the files are displayed using Slovak, or Japanese, characters.

    WinMerge also detects a codepage difference between the left/right files. To avoid lossy conversions when you merge, copy, or paste, we suggest that you ignore the codepage information.

    [Caution] Caution

    When you copy or paste text to an external application, the external application must use the same codepage as WinMerge does. Refer to the documentation for your external editor. For copying to WinMerge, Internet Explorer offers codepage selection. If your external editor does not support custom codepages, disable this option.


Locale support

The WinMerge user interface is in English by default, but you can localize your installation to other languages for which translations have been contributed. Localizing WinMerge changes text strings that are displayed in the interface, including menus, dialogs, tooltips, and messages, to the language you choose.

Note that localization does not extend beyond the translation of strings. For example, it does not affect how numbers are divided or how words are alphabetized. (Those issues should be addressed in the conventional Windows manner by using the Regional settings in the Control Panel.)

Localizing your WinMerge installation involves these two basic steps:

  1. Configuring the localization: Make one or more language files available to WinMerge.

  2. Configuring the localization: Choose one of the configured language files.

1. Configuring the localization

Configuring a localization simply involves making its translation file available to WinMerge, either during or after the installation.

  • It's easiest to configure a language file during WinMerge installation. The instructions in Using the installer (recommended) describe how to use the Select Components page to install one or more translation files.

  • If you did not configure a language file when you installed WinMerge (or did not use the installer at all), there is no need to re-install WinMerge. You can get the latest translation files from the WinMerge site and configure it yourself:

    1. Create a folder named Languages under the WinMerge installation directory (where WinMerge.exe or WinMergeU.exe is located), if it does not already exist.
    2. Go to the WinMerge download site. Download one of the archived binary files (either Zip or 7z format) for the current WinMerge version, and save it to your file system.
    3. Open the downloaded archive, and locate the *.po files, where * is a language (for example, Swedish.po for the Swedish translation). Extract the language files you want to the Languages subfolder in your WinMerge installation directory.

    The language files are now available the next time you run WinMerge.

2. Changing the Winmerge interface language

If you have configured one or more translation files, as described in the preceding section, you can change the localization of WinMerge to any of them:

  1. Run WinMerge.
  2. Select Language from the View menu.
  3. Select your language and click OK.

The language of the WinMerge user interface is instantly updated.

3. Available WinMerge localizations

WinMerge localizations contributed to date include the following translations:

  • Bulgarian
  • Catalan
  • Chinese (both Simplified and Traditional)
  • Croatian
  • Czech
  • Danish
  • Dutch
  • French
  • Galician
  • German
  • Greek
  • Hungarian
  • Italian
  • Japanese
  • Korean
  • Norwegian
  • Polish
  • Portuguese
  • Portuguese (Brazilian)
  • Romanian
  • Russian
  • Slovak
  • Slovenian
  • Spanish
  • Swedish
  • Turkish
  • Ukrainian

4. Reporting errors in translation

Please submit any errors you find in translations as bugs to our bug-list. It would be great if you also provide a corrected version of the translated text.

5. Submitting a new translation

If you would like to add your language to the list, read the Translations documentation in the WinMerge Web site to learn how. All the translations are incomplete, so your help improving them would be appreciated. Translating (or improving translation) does not require you to have all the compile tools or to know about WinMerge internals, just to follow the instructions in the preceding link. And if you have problems, ask for help from us in one of the WinMerge forums.


Plugins

WinMerge plugins are custom dlls or scriptlets, written in the COM API, that preprocess data before a comparison. For example, you can use a plugin to extract text data from MS Word files for WinMerge to compare. Plugins are not included when you install WinMerge, either because the functions that they provide are of interest to only a few users, or because they do not fit into the WinMerge architecture.

Each plugin is:

  • A single dll or a scriptlet (sct) file

  • Installed in the MergePlugins subfolder. A number of plugins are installed for you by WinMerge.

  • Easy to install: To install a plugin that is not included in the WinMerge installation, just copy the plugin file to MergePlugins. The plugin is available the next time you open WinMerge.

1. Plugin Types

Plugins are grouped into three main categories:

Editor complement

This type of plugin performs custom operations on selected text in the active editor (File pane) of the File Compare window.

Unpacker: transform a file to a text format

This type of plugin transforms a compressed file to a viewable format by decompressing it. The original file is not changed: a temporary transformed file is created and loaded in WinMerge.

Unpacker plugins operate on entire files, not to selected text or diffs within files. Therefore, they are available only when you launch file comparisons, from either the Folder Compare window or the Select Files or Folders dialog. Unpacker plugins are not available in the File Compare window.

Sometimes the unpacked file can be repacked (see the details in Available plugins to check whether a plugin supports repacking). Then, you can merge and save the transformed file. The packing is done automatically in this case. To be safe, we suggest that you rename the transformed file when you save it.

[Note] Note

When you compare folders, WinMerge can give different results for compressed and uncompressed files. For example, files that are identical when uncompressed might be different if they include the creation date. WinMerge applies the unpacker in all situations, and you are sure to have the same result when you compare a folder, or when you merge two versions of a file.

Example plugin: DisplayXMLFiles.dll reformats XML files for readability.

Prediffer: preprocess files to hide some differences

This type of plugin does not operate on the source files displayed in the Compare window. It operates instead on temporary copies of the files, and the copies are then scanned to create the difference list.

Example plugin: IgnoreColumns.dll ignores the differences inside specified columns, while displaying the characters in these columns.

2. Suggested plugins and automatic modes

How is WinMerge able to apply the right plugin for a given file? Each plugin specifies a list of file extensions (also listed in each plugin's Available plugins section, under File filter). The extensions are used to associate one or more file types with the plugin: when a compared file's extension matches an extension in the plugin's list, the plugin is considered to be a suggested plugin.

There are separate WinMerge options for the unpacking and prediffer types, described later in this topic, that enable you to apply the plugins either manually or automatically. There is no automatic mode for editor complement plugins.

When you apply plugins to a selected file using automatic mode, WinMerge searches its list of suggested plugins for that file type, and applies the first plugin whose name matches. The search is performed in alphabetical order, so if there are multiple suggested plugins for a file type, only the first one found is applied.

3. Applying plugins

The following subsections describe how to apply each type of plugin. The methods are different for each type of plugin, and also vary depending on whether you are comparing folders or files.

3.1. Applying editor complement plugins in the File Compare window

With your cursor in either File pane of the File Compare window, click Edit → Scripts and choose one of these functions:

  • MakeUpper

  • MakeLower

  • InsertDate

  • InsertTime

The functions are contributed to the Scripts menu by the editor addin.sct and insert datetime.sct plugins.

[Note] Note

Editor complement plugins are not available in the Folder Compare window.

3.2. Applying unpacker plugins in the Folder Compare window

Before applying unpacker plugins, you can set its mode to either automatic or manual mode.

  • To set automatic mode for this type of plugin, click Plugins → Automatic Unpacking.

  • To set manual mode, click Plugins → Manual Unpacking.

Remember to click F5 to reload the Folder Compare window using the new setting.

3.2.1. Using automatic mode

To apply plugins when automatic unpacking is set, simply launch a compare operation on a file in the Folder Compare window. If the file's type suggested unpacker plugin (if any) preprocesses the file before WinMerge opens it in the File Compare window.

For example, suppose you right-click an MS Word doc file and choose Compare (also assume that the CompareMSWordFiles.dll plugin is available). WinMerge converts the doc file (or rather, a copy of it ) to a plain text file and opens it in the File Compare window.

3.2.2. Using manual mode

Manual mode enables you to choose a different unpacker plugin than the one that is selected for you in automatic mode. You can also launch the compare using no plugin.

To apply plugins when manual unpacking is set:

  1. Select the file you want to compare.

  2. Click Plugins → Edit with Unpacker.

    This menu item is enabled only if the selected file's type is supported by an available unpacking plugin.

  3. In the Select Unpacker dialog:

    1. Configure automatic plugin selection or choose a plugin manually:

      • To use automatic mode (which applies the first available plugin), verify that <None> is displayed in the the File unpacker control.

      • To choose a different plugin (if available), use the File unpacker control to choose the plugin.

        By default, this control lists only suggested plugins for the file type you selected to compare. To see all available plugins, enable the option, Display all packers, don't check the extension.

      • To launch the compare without using any plugin, choose <None> in the File unpacker control.

    2. Click OK to close the Select Unpacker dialog.

  4. Click OK to close the Select Unpacker dialog and launch the file comparison.

3.3. Applying unpacker plugins in the Select Files or Folders dialog

You can use the Select Unpacker dialog to apply a plugin when you launch a file comparison from the Select Files or Folders dialog. See Selecting an unpacker for file comparisons for details.

3.4. Applying prediffer plugins in the Folder Compare window

With prediffer plugins, you set the mode (Auto prediiffer or No prediffer) for individual files. (Contrast this with unpacker plugins, where you set the mode for all files.) That is, some files in the same folder have different prediffer modes.

To set the mode for one or more files in the Folder Compare window, right-click the files and choose Plugin Settings → Prediffer Settings, then choose one of the submenu options:

  • Auto Prediffer selects the first prediffer plugin available for the file type.

  • No prediffer means that no prediffer plugin is used.

Click F5 to update the window.

[Note] Note

When you open a subfolder during a non-recursive compare, the mode is always reset to No prediffer.

When you open a file from the Folder Compare window, your prediffer setting for that file is applied before the File Compare window is opened.

3.5. Applying prediffer plugins in the File Compare window

In the File Compare winodw, you can apply a prediffer plugin by clicking Plugins → Prediffer and choosing one of the plugins in the list. Suggested plugins are indicated at the top of the list. The files are compared again after the plugin is applied, so you don't need to rescan the files.

4. Available plugins

4.1. CompareMSExcelFiles.dll

Displays the text contents of a Microsoft® Excel file, stripping away all formatting and embedded objects.

Category: Unpacker
File filter: *.xls
Packing: No
Requirement: Microsoft® Excel, Visual Basic runtime library

4.2. CompareMSWordFiles.dll

Displays the text content of a Microsoft® Word file, stripping away all formatting and embedded objects.

Category: Unpacker
File filter: *.doc, *.dot
Packing: No
Requirement: Microsoft®Word, Visual Basic runtime library

4.3. DisplayXMLFiles.dll

This plugin pretty-prints XML files nicely by inserting tabs and line breaks. This is useful for XML files that do not have line returns in convenient locations.

Category: Unpacker
File filter: *.xml
Packing: No

4.4. editor addin.sct

Adds two functions to the Edit → Scripts menu:

  • MakeUpper convert the selection to UPPER CASE.
  • MakeLower convert the selection to lower case.
Category: Editor complement

4.5. IgnoreColumns.dll

This plugin ignores characters at specified columns. The first column is number 1

Note that this plugin does not support files with tabs: the plugin does not fail, but all tabs are be treated as normal characters.

To specify columns, rename the dll using following fields as parameters:

  • Delimiters between ranges: _ or ,
  • Delimiters between min and max: anything else
  • Min and max are included.
  • When max = min, max can be omitted.

Example 1. IgnoreColumns.dll examples

IgnoreColumns _ 3 _ 10 - 20 _ 32 - 33.dll
Ignore all characters at column 3, and in columns 10 to 20, and 32 to 33.
IgnoreColumns_1,30 to 40.dll
Ignore all the characters in column 1, and in columns 30 to 40.

Category: Prediffer
File filter: *.txt

4.6. IgnoreCommentsC.dll

The plugin ignores comments within //... and /* ... */ delimiters in C, C++, PHP and JavaScript files.

Category: Prediffer
File filter: *.cpp, *.cxx, *.h, *.hxx, *.c, *.php, *.js,

4.7. IgnoreFieldsComma.dll

This plugin is for files with fields and commas as delimiters (CSV files, for example). It ignores the delimiter characters. The first field is number 1.

To specify the delimiters, rename the dll using the same parameter fields used for IgnoreColumns.dll.

Category: Prediffer
File filter: *.csv

4.8. IgnoreFieldsTab.dll

This plugin is for files that use fields and tabs as delimiters (for examle, Excel files saved in the *.txt format). It ignores the delimiter characters. The first field is number 1.

To specify the delimiters, rename the dll using the same parameter fields used for IgnoreColumns.dll.

Category: Prediffer
File filter: *.txt

4.9. IgnoreLeadingLineNumbers.dll

This plugin ignores the leading line numbers in text files (for example, NC and BASIC files).

Category: Prediffer
File filter: *.nc
Requirement: Visual Basic runtime library

4.10. insert datetime.sct

Adds two functions to the Edit → Scripts menu:

  • InsertDate insert date in the current locale format.
  • InsertTime insert time in the current locale format.
Category: Editor complement

4.11. RCLocalizationHelper.dll, RCLocalizationHelperU.dll

This plugin preprocesses RC files by stripping out localized strings, to enable comparing different language versions of the same RC file and ignoring the translations.

RCLocalizationHelperU.dll is the Unicode version.

Category: Prediffer
File filter: *.rc

4.12. WatchBeginningOfLog.dll, WatchEndOfLog.dll

For long LOG files, often only in the first lines or in the last lines are significant.

  • WatchBeginningOfLog.dll truncates the files to the first 1/10th.
  • WatchEndOfLog.dll truncates the files to the first 1/10th.
Category: Unpacker
File filter: *.log
Packing: No

Developers can find information and code examples in the source package, under the Plugins folder.

5. Requirements

5.1. Windows Script Host

Some editor complement plugins require this optional component from Microsoft®.

If the list of editor complements does not include all editor plugins, this component is probably missing. To help you verify, WinMerge displays a comment at the bottom of the list. You can install WSH on any version of Windows Download it from MSDN Library, using IE 4.0 or later.

5.2. Visual Basic runtime library

Some plugins require the Visual Basic runtime library to work.

You can download the required file msvbvm60.dll, or use the Run-Time Redistribution Pack from Microsoft®. If you don't need the plugin, you can safely remove it.


Using Filters

When you compare files or folders, you can use filters to narrow the scope of the comparison. This can be useful when you want to simplify the comparison result by eliminating differences that you are not interested in. Filters are rules based on regular expressions. WinMerge uses the popular PCRE (Perl Compatible Regular Expressions) regular expression engine.

The basic function of filtering is simple: evaluate each item that would normally be compared (a folder, file, or line within a file), and if the filter expression matches the target item, apply the filter. Depending on the type of filter, the item is either included or excluded in the comparison.

There are different WinMerge filters for folder compare and file compare operations:

Folder comparison: File masks and file filters

You can specify files to include in a folder comparison by using simple file masks, or, for more complex filtering, by applying multiple rules specified in a file filter. You cannot apply both a file mask and a file filter in the same operation.

Files and folders that are filtered are hidden in the result by default, which is typically what you want. You can click View → Show Skipped Items to unhide filtered items, but the Folder Compare window shows only minimal information about them. For example, you cannot tell whether a skipped file is a text file or binary.

File comparisons: Line filters

Line filters are applied only to file compare operations. They let you ignore single line differences.

1. Using file masks

You can use one or more file masks that specify file extensions to include in a folder comparison. All other files are omitted from your selection.

1.1. Defining and applying file masks

Define and apply a file mask at the time you launch your folder compare operation:

  • If you are using the Select Files or Folders dialog, after choosing the Left and Right folders, enter one or more file masks in the Filter field. The masks are applied when you start the folder compare operation.

  • If you are using the WinMerge command line, use the -f flag to specify file masks (see the example in the next section).

Remember, you cannot specify both a file mask and a file filter in the field or command line.

1.2. File mask syntax and example

Use this syntax for file masks:

*.[extension][delimiter *.extension ...]

Valid delimiters are spaces, commas, colons or semicolons.

A mask with no extension ( *. ) selects files without any extension, such as README.

Example 1. File mask

In this command-line example, the folder compare operation includes only files with xml or txt extensions. All other files are omitted:

WinMergeU c:\project\docs c:\temp /f *.xml;*.txt

2. Using file filters

File filters are text files with an extension of flt. They enable you to apply multiple filtering rules to a folder comparison. Unlike file masks, file filters can either include or exclude matches.

WinMerge installs a number of predefined file filters. If these file filters do not provide the filtering you need, you can create your own. To make that task easier, WinMerge also provides a template file named FileFilter.tmpl. This section describes how to apply file filters to comparisons, and documents the file filter syntax. Using the Filters dialog describes how to add, edit, and manage filters.

2.1. File filter locations

WinMerge automatically detects file filters in these locations:

Filters subfolder in the WinMerge installation folder

This is where the predefined file filters are installed. For example, C:\Program Files\WinMerge\Filters. You can create or copy filter files in this location to make them available to all users on your system.

Before creating a new file filter, see if the predefined ones already contain what you need. If not, you might find useful rule examples in the existing files.

Default private filter folder

The location of this folder is defined in the System page of WinMerge options. By default, it is specified as a subfolder in your user profile folder (for example, My Documents\WinMerge\Filters in Windows XP). Filters that are created or copied here are normally visible only to you. If you create new file filters, you can copy them here to keep them private.

Before you can apply file filters that exist in any other folder, you must first install them.

2.2. Applying file filters

You can apply a file filter using any of these methods:

  • When you launch a folder compare from the Select Files or Folders dialog:

    1. After choosing the Left and Right folders, click Select next to the Filter field.

    2. In the Filters dialog, use the Filefilters tab to choose a file filter and load it in the Filter field.

      [Note] Note

      If a file filter is currently enabled, the selected file filter is already loaded in the Filter field.

    3. Proceed with the compare operation. The file in the Filter field is applied when you start the operation.

  • To change file filtering after you have already launched a folder compare operation (for example, applying a different filter or disabling filtering):

    1. Click Tools → Filters.

    2. In the Filters dialog, configure your new file filter setting, and click OK.

    3. The new filtering is not automatically applied when you close the Filters dialog: press F5 to see the new results in the Folder Compare window.

  • When you launch a folder compare from the WinMerge command line, use the -f flag to specify a file filter.

Remember, you cannot apply both a file mask and a file filter in the field or command line.

2.3. File filter syntax

This section describes the syntax of WinMerge file filters and provides guidelines for writing them.

The comment delimiter is ##. After a comment delimiter, all characters in a line are ignored. WinMerge ignores most whitespace characters in rules. However, a comment must always be preceded by one or more whitespace (space or tab) characters. To use ## as characters in a rule, omit the whitespace prefix.

The first two required lines of a file filter are:

name

The filter name that is listed in the Files dialog

def

The type of filtering to be applied. Specify one of these values:

include

Includes everything except items matching the specified rule.

exclude

Excludes everything except items matching the specified rule.

When you choose the exclude method, you must also add a d (directory) rule that specifies the subfolders. It's usually a good idea to specify all subfolders, like this:

d: \\*$ ## Subfolders
[Tip] Tip

Don't confuse these terms. Remember, in file filters, an include rule does not specify what to include, it specifies what not to include. Similarly, exclude does not specify what to exclude, it specifies what not to exclude.

Next, your file should contain one or more filter rules. You can add as many rules as you like. There must be one rule per line, and each rule must be entirely on one line (no line breaks are allowed in a rule). Each rule consists of either an f: or a d: type designator, followed by a reqular expression, where:

f: regexp

matches for files, or

d: regexp

matches for folders

Among the many regexp special characters, the following are particularly important in file filter rules:

^ (beginning of line)

Frequently required for rules to work correctly.

$ (end of line)

Frequently required for rules to work correctly. For example:

\.c$ ## matches only file names with the extension, c.
\.c  ## matches any extension beginning with c, like cpp and com.
\ (escape)

Forces special characters to match normal characters. For example, to match a folder name, precede the folder backslash delimiter with a backslash (\\). To match the dot in a file name, specify a backslash followed by a dot (\.).

No special characters or wildcards are used to match file names. To match all filenames of a certain type, simply omit the filename.

Rules are case-insensitive. For example, f: \.bat& matches winmerge.bat and compare.BAT.

Example 2. File filter rule examples

Some simple file filter rules:

f: \.cpp$ ## Match *.cpp files
f: \.h$ ## Match *.h files
f: ^My ## Match My*.* files
f: Dlg\. ## Match *Dlg.* files
d: \\test$ ## Match test folders
d: ^\\Build$ ## Match Build folders
d: Temp$ ## Match *Temp folders (for example, FirstTemp)
d: Src ## Match *Src* folders

Some rules with more complex regular expressions:

f: ^\.#.*$ ## .#filename.version files
f: Dlg\.c(pp)?$ ## *Dlg.c and *Dlg.cpp files
f: ^I.*\.h$ ## I*.h files
f: Srv[1-9]\.def$ ## *Srv1.def to *Srv9.def files
f: ^[h,k,m] ## h*.*, k*.*, and m*.* files

3. Using line filters

In a file comparison, you can use line filters to ignore single lines. For example, you might use line filters to ignore comments or certain type of generated code, like version control system timestamps. Each line filter is a rule, and you can apply any number of line filters to a file comparison.

To learn how to add, edit, and manage filters, see Using the Filters dialog.

3.1. Applying line filters

You can apply line filters using any of these methods:

  • When you launch a file compare from the Select Files or Folders dialog

    1. After choosing the Left and Right files, click Select next to the Filter field.

    2. In the Filters dialog, use the Linefilters tab to enable the line filters you want to use (if any), or to see what line filters are currently enabled.

      [Note] Note

      The Filter field does not indicate what line filters are enabled.

    3. Proceed with the file compare operation. The enabled line filters are applied when you start the operation.

  • After you have already launched a file compare operation (for example, to apply different filters or disabling filtering)

    1. Click Tools → Filters.

    2. Open the Filefilters tab.

    3. Check the individual line filters you want to apply, and uncheck filters that you don't want to apply.

      You can also add, edit, and remove filters from the list by using the New, Edit, and Remove buttons.

    4. To turn on line filtering, check the Enable Line Filters. To turn line filtering off, uncheck the option.

    5. Click OK to dismiss the File Filters dialog.

    6. Click F5 to apply your changes and refresh the File Compare window.

3.2. Line filter syntax

A line filter is a rule that is evaluated against each single-line difference in your compared files, if line filter rules are enabled. When a rule matches a single-line difference, the difference is ignored.

Ignored differences are marked in the File Compare window with the Ignored Difference color (as defined in the Colors page of WinMerge Options). This enables you to distinguish ignored differences from other types. However, you cannot select or merge ignored difference.

Line filter matching can be described in terms of two ideas:

  • When a rule matches any part of the line, the entire difference is ignored. Therefore, you cannot filter just part of a line. For example, suppose two files have the following single-line difference:

    File1:

    # Jean Sibelius

    File2:

    # Janne Sibelius

    With no filtering, the line is detected as a difference. But if we apply a line filter rule with the expression, ^#, the lines are reported as identical, because the expression specifies only the first character, which matches in both files.

  • A rule is applied to a multi-line difference only if all the lines match. For example, consider this two-line difference:

    File1:

    # Jean Sibelius
# Pekka Himanen

    File2:

    # Janne Sibelius
Pekka Himanen

    The same ^# rule matches the first line, but not the second line. Therefore, the difference is not ignored.

[Tip] Tip

It's usually good practice to use the beginning of line ( ^ ) and end of line ( & ) markers to control your patterns precisely, because the rule is applied if any part of a line matches the expression.

Example 3. Sample line filters

^MYTAG$

Filters lines that exactly match MYTAG

^::

Filters lines beginning with ::

^/\**.\*/$

Filters lines beginning with /* and ending with */

^[1-5]00

Filters lines beginning with numbers 100, 200, 300, 400, and 500

Example 4. Line filter rule matching CVS Id lines

CVS Id lines look like this:

// $Id: Filters.xml 5963 2008-09-16 20:08:12Z kimmov $

... and can be filtered with this rule:

^// \WId: .*\$

Example 5. Filter line number comments in po files

po line number comments look like this:

#: src/filename.c:766

... and can be filtered with this rule:

^#

4. Using the Filters dialog

This section describes the Filters dialog, which provides functions to create and manage file filters and line filters.

To open the Filters dialog, use either of these methods:

  • In the Select Files or Folders dialog, click Select to the right of the Filter field. You use this method when you want to apply a file filter to a folder compare operation.

  • Click Tools → Filters. This method can be used at any time except when the Select Files or Folders dialog is open.

The Filters dialog has a tab for each type of WinMerge filter:

Filefilters

Choose this tab to work with file filters for folder compare operations.

Linefilters

Choose this tab to work with line filters for file compare operations.

4.1. Using the Filefilters tab

The main part of this tab is a list of file filters that are available for folder compare operations. The list includes shared, private, and installed file filters that WinMerge knows about, as described in File filter locations.

4.1.1. Enabling and disabling file filters

You must enable a file filter to make it available in a folder comparison operation, or to disable a current filter to stop it from being used:

  1. Open the Filters dialog, if it is not already open.

  2. Select a file filter or <None> from the list.

  3. Click OK to dismiss the Filters dialog.

There are several ways to apply file filters after enabling them. For details, see Applying file filters.

4.1.2. Configuring file filters

Use these buttons to manage your Filefilters list and create new file filters:

Test

Select a file filter in the list and click Test to quickly see how the filter works. See Testing file filter rules for details.

Install

Enables you to locate a file filter and adds it to the Filters list. File filters that are not in either the shared or default private folder are not detected unless you install them.

New

Creates a new copy of a file template in either the shared or private filter folders, and opens it in your default editor. Edit the template and add your rules, as described in Creating a file filter.

Edit

Select a file filter in the list and click Edit to open the file in your default editor.

Delete

Select a file filter in the list and click Delete to delete the file and remove it from the list. Yes, the file is really deleted!

Your changes are saved when you click OK to dismiss the Filters dialog.

4.1.3. Creating a file filter

If the file filters that are installed with WinMerge do not provide the filtering you need, you can create your own:

  1. Click Tools → Filters. Or, from the Select Files or Folders dialog, click Select to the right of the Filter field.

  2. In the Filters dialog Filefilters tab, click New.

  3. In the Shared or Private Filter dialog, choose Shared Filter or Private Filter (see File filter locations for their uses) and click OK.

    The Select filename for new filter dialog opens in the shared or private files folder on your system (if the private folder does not exist, WinMerge creates it).

  4. In the Select filename for new filter dialog, enter a new file name and click Save.

    [Note] Note

    Don't choose an existing file name: to edit an existing file, go back to Step 2 and click Edit instead of New.

    WinMerge initializes the new file with the contents of the FileFilter.tmpl tempate, and opens it in your default text editor.

  5. Follow the template instructions to edit the template, updating the placeholder name and description and adding filter rules as described in File filter syntax. Save the file in your text editor.

    [Tip] Tip

    If you want to quickly test a rule that you are defining, try clicking Test in the Filters dialog. See Testing file filter rules for details.

  6. If you created your file filter in one of the standard Filters folders, and the Filters dialog does not list your new file filter, try clicking OK to close it, then click Tools → Filters again to reopen it. The Filefilters list should now include the new file filter.

    If you saved the file in an alternate location on your file system), WinMerge cannot detect it unless you install it. To make a file filter detectable anywhere on your system:

    1. Click Install in the Filters dialog.

    2. In the Locate filter file to install dialog, navigate to the flt file on your system, and click Open. The Filefilters list should now include the installed file filter.

4.1.4. Testing file filter rules

Use the Test Filter dialog to quickly test a file filter against sample data, to help you develop new rules or to understand how existing rules work. It can be easier than running a full compare operation.

Starting from the Filters dialog:

  1. In the Filefilters tab, choose the file filter you want to test.

  2. If you want to see the rules you will be testing,click Edit now to open the file so that you can view it during the next steps.

  3. Click Test.

  4. In the Test Filter dialog, choose the type of rule to test:

    • To test an f: file rule in your file filter, uncheck the Folder Name option.

    • To test a d: folder rule, check the Folder Name option.

  5. Enter the text to test.

    The text should be appropriate for the type of rule you are testing. For example, if you have checked the Folder Name option, you probably want to enter a folder name, such as \temp.

    The Result box displays your entry, followed by its status: either passed or failed.

4.2. Using the Linefilters tab

Use this tab to configure and enable line filters for file compare operations. The tab features a list of rules. Each rule contains a single regular expression. You can apply any combination of rules from the list to a file comparison.

4.2.1. Configuring line filters

Below the Regular Expressions list is an edit box and buttons that you can use to maintain the list at any time by adding, editing, and removing rules.

To add a new rule:

  1. Click New. Your edit cursor is automatically enabled in the edit box.

  2. Enter an expression in the edit box below the Regular Expressions list.

  3. Click Save to load the expression in a new line in the list.

To edit an existing rule:

  1. Select the line and click Edit.

  2. Edit the expression in the edit box.

  3. Click Save when you're done.

To delete an existing rule, select (check) the rule and click Remove.

4.2.2. Enabling and disabling line filters

  1. In the Regular Expressions list, check just the filters that you want to apply, and uncheck any filters you do not want to apply.

  2. Check or uncheck the Enable Line Filters option. If you turn filtering on, all the rules that are currently checked in the Regular Expression list are used. If filtering is off, no rules are used even if they are checked.

  3. Click OK to dismiss the Filters dialog and save your settings.

There are several ways to apply file filters after enabling them. For details, see Applying line filters.

5. Getting help with regular expressions

Regular expressions can be very complex. Fortunately, most file filters in WinMerge involve simple extension expressions, as shown in the examples in this topic. The filter files installed with WinMerge include many other useful examples.

Finally, there are lots of resources on the Web for help with regexps, including these sites:

Good site devoted to regexps:
http://www.regular-expressions.info/
Good HOWTO for regexps:
http://www.amk.ca/python/howto/regex/
Tutorial:
http://www.zvon.org/other/PerlTutorial/Output/index.html
PDF quick reference:
http://www.night-ray.com/regex.pdf


Version control integration

WinMerge provides optional, basic integration with some version control system (VCS) tools. By default, WinMerge is not integrated with any version control system. You can configure VCS integration both during and after installing WinMerge:

If the WinMerge installer detects whether TortoiseSVN, TortoiseCVS, or Rational ClearCase are present on your system, the Setup Additional Tasks page contains options to enable any of the WinMerge integrations.

After installation, you can open the Options dialog and configure either the ClearCase or Visual SourceSafe integration, as described in Version Control options.

[Note] Note

Only the ClearCase integration can be configured using both methods. You can configure TortoiseSVN and TortoiseCVS only during installation; conversely, you can configure Visual SourceSafe (which is not detected by the installer) only in the Options dialog.

Each WinMerge version control integration has one of these basic types of interaction:

WinMerge launches VCS file checkout

With version control systems that lock files (ClearCase and Visual Source Safe), WinMerge opens the VCS's checkout dialog before saving a file. It is up to you to check out the file, and then to check in the file later using the version control system's tools. WinMerge does not provide checkin or history tools.

VCS use WinMerge as its diff tool

When you start a diff operation using TortoiseSVN and TortoiseCVS, the integration opens WinMerge instead of the native VCS diff utility.

Example 1. TortoiseSVN integration

TortoiseSVN is a Windows client for Subversion (SVN), an open source version control system. TortoiseSVN provides its own diff utility. The WinMerge integration with this VCS enables you to use WinMerge to compare files instead of the TortoiseSVN diff tool.

One of the main uses of TortoiseSVN's diff is to see the most recent changes to a file that is under version control: that is, a file that you have checked out into a working copy. The following procedure illustrates such an operation using the WinMerge integration with TortoiseSVN. The integration with TortoiseCVS is similar.

  1. In Windows Explorer, navigate to a Subversion working copy that you have checked out.

  2. Right-click a file that is under Subversion management (usually indicated by a distinct TortoiseSVN icon), and click TortoiseSVN in the context menu.

    • If the file has not been modified, the context menu contains the shortcut, Diff with previous version. This command compares the checked-out version of the file with the previous version that was checked in to the repository.

    • If you have modified the file, the context menu contains the same Diff with previous version shortcut, plus the Diff shortcut. This command compares your revision to the current version (the one you checked out). It is useful for reviewing the changes you have made.

  3. Choose either the Diff with previous version or Diff shortcut. The WinMerge window opens, with the target file versions loaded In the File Compare window.

The TortoiseSVN → Diff shortcut is available for comparing any two files in your file system, not just files that are managed by Subversion. To illustrate how the WinMerge integration works in this case:

  1. In Windows explorer, hold Ctrl, select any two files, and right-click.

  2. Choose TortoiseSVN → Diff in the context menu.

    The WinMerge window opens, with the selected files loaded In the File Compare window.

Example 2. Visual Source Safe integration

This example demonstrates the file checkout type of VCS integration.

  1. Launch a WinMerge file or folder comparison whose left or right target is under version control

  2. In WinMerge, edit a version-controlled file

  3. Save your changes. WinMerge detects that the file is read-only, and assumes that it is under Visual Source Safe version control. WinMerge opens a Visual Source Save dialog, like this:

  4. In the Database dropdown list, choose the correct Visual SourceSafe database if there is more than one on your system.

  5. The Project field shows the selected file's location relative to the Visual SourceSafe database path. Verify that the path is correct: most errors are caused by the wrong project path. If you change folders, remember to change the project path, too!

  6. Enter your password if required. WinMerge remembers your password for the current session, but for your security does not store it. Therefore, you don't need to retype the password during a session, but you must retype the password each time you open WinMerge.

  7. Optionally, enable one or both of these options:

    • Link to Destination VSS project

    • Apply to all items. This option enables you to check out multiple files in a single directory when you copy files in a folder compare operation.

Unfortunately, VSS provides very little information about error conditions beyond the fact that they occurr. If an operation fails, causes might include any of the following conditions:

  • Another user might have the file checked out with exclusive access.

  • You might have specified the wrong project.

  • You might have entered the project name incorrectly.

  • You might not have used a valid VSS path (for example, this is incorrect: $/MyProject/res).

  • Your connection to the VSS server computer might be broken.


Command line

The WinMerge command line accepts several parameters in addition to the paths to compare. Most of these parameters are intended for using WinMerge as an external compare application or starting a compare operation from a batch file.

Use one of these formats for the WinMerge command:

WinMerge[U] [/?]

WinMerge[U] [/r] [/e] [/f filter] [/x] [/s] [/ul] [/ur] [/u] [/wl] [/wr] [/minimize] [/maximize] [/dl leftdesc] [/dr rightdesc] leftpath rightpath [outputpath]

WinMerge[U] conflictfile

The command has two forms:

WinMergeU

Use WinMergeU if you are running the Unicode version of WinMerge, typically installed on recent Windows systems.

WinMerge

Use WinMerge only if you are running the ANSI version of WinMerge, typically installed only on Windows 9x and WME systems.

Entering the command with no parameters or pathnames simply opens the WinMerge window. Parameters are prefixed with either a forward slash ( / ) or dash ( - ) character. Pathnames have no prefix character.

  • /? opens WinMerge Help at this topic.

  • /r compares all files in all subfolders (recursive compare). Unique folders (occurring only on one side) are listed in the compare result as separate items. Note that including subfolders can increase compare time significantly. Without this parameter, WinMerge lists only files and subfolders at the top level of the two target folders. It does not compare the subfolders.

  • /e enables you to close WinMerge with a single Esc key press. This is useful when you use WinMerge as an external compare application: you can close WinMerge quickly, like a dialog. Without this parameter, you might have to press Esc multiple times to close all its windows.

  • /f applies a specified filter to restrict the comparison. The filter can be a filemask like *.h *.cpp, or the name of a file filter like XML/HTML Devel. Add quotation marks around a filter mask or name that contains spaces.

  • /x closes WinMerge (after displaying an information dialog) when you start a comparison of identical files. The parameter has no effect after the comparison, for example if the files become identical as a result of merging or editing. This parameter is useful when you use WinMerge as an external compare application, or when you want to eliminate unnecessary steps by ignoring files that don't have any differences.

  • /s limits WinMerge windows to a single instance. For example, if WinMerge is already running, a new compare opens in the same instance. Without this parameter, multiple windows are allowed: depending on other settings, a new compare might open in the existing window or in a new window.

  • /ul prevents WinMerge from adding the left path to the Most Recently Used (MRU) list. External applications should not add paths to the MRU list in the Select Files or Folders dialog.

  • /ur prevents WinMerge from adding the right path to the Most Recently Used (MRU) list. External applications should not add paths to the MRU list in the Select Files or Folders dialog.

  • /u prevents WinMerge from adding either path (left or right) to the Most Recently Used (MRU) list. External applications should not add paths to the MRU list in the Select Files or Folders dialog.

  • /wl opens the left side as read-only. Use this when you don't want to change left side items in the compare.

  • /wr opens the right side as read-only. Use this when you don't want to change right side items in the compare.

  • /minimize starts WinMerge as a minimized window. This option can be useful during lengthy compares.

  • /maximize starts WinMerge as a maximized window.

  • /dl specifies a description in the left side title bar, overriding the default folder or filename text. For example: /dl "Version 1.0" or /dl WorkingCopy. Use quotation marks around descriptions that contain spaces.

  • /dr specifies a description in the right side title bar, just like /dl.

  • leftpath specifies the folder, file, or project file to open on the left side.

  • rightpath specifies the folder, file, or project file to open on the right side.

    WinMerge cannot compare files to folders, so both path parameters (leftpath and rightpath) must point to the same target type (either folders or files). If WinMerge cannot find either of the specified paths, it opens the Select Files or Folders dialog, where you can browse for the correct paths.

    [Tip] Tip

    In file comparisons, you can specify a folder name in one of the path parameters, as long as the folder contains a file with the same name as the one specified in the other, file path.

    For example, consider this command:

    WinMergeU C:\Folder\File.txt C:\Folder2

    If C:\Folder2 contains a file named File.txt: WinMerge implicitly resolves the second path as a file specification, and compares the two files. Of course, the command is invalid if C:\Folder2 does not contain a file named File.txt.

  • outputpath Specifies an optional output folder where you want merged result files to be saved.

    The third, output path is rarely needed when you start WinMerge from the command line. It is meant to be used with version control tools, where you might need to specify a third path for the result file. If you specify a third path, WinMerge still shows only two files in the File Compare window. However, if you save either of these files, it is written to the third path, leaving the two source files intact.

    Version control systems typically refer to the source and result files using terms like theirs, mine, and either merged or resolved. If you specify a third path on the WinMerge command line, and are working with a version control system, you should list the files in that order.

  • conflictfile Specifies a conflict file, typically generated by a Version control system. The conflict file opens in the File Compare window, where you can merge and resolve conflicts, as described in Resolving conflict files. Note that no other paths can be used with a conflict file.


Frequently asked questions

1. General questions

1.1.

Why are there two executable files, WinMerge.exe and WinMergeU.exe?

They support the different character encoding capabilities of older and newer versions of Windows.

  • WinMerge.exe is an ANSI (8-bit) executable that works in all 32-bit Windows systems. It does not have Unicode support.

    Internally, it stores only ANSI characters (256 possibilities). If you open a Unicode file, the characters must be converted to the ANSI codepage. Because there are over 100,000 Unicode characters, and only 256 can be represented in the ANSI codepage, data loss can occur. Conversion might be approximate (for example, accents are lost) or impossible: characters are replaced by question marks ( ? ).

    WinMerge.exe also cannot open files with names outside the current ANSI codepage. For example, WinMerge.exe running on an English system cannot open a file with a Hebrew name.

  • WinMergeU.exe is a Unicode-enabled executable that works on Windows NT4, Windows 2000, and newer systems. Because it supports Unicode, it has none of the limitations listed above for WinMerge.exe.

1.2.

That splash screen is annoying, how do I turn it off?

In the WinMerge menu, click Edit → Options. In the Options window General page, deselect (uncheck) the option, Disable Splash Screen.

1.3.

I want to compare folders, but I cannot select a folder in the Browse dialog.

Browse in the folder contents to the folder you want to compare. Do not select any of the files or subfolders, just click Open when Folder Selection is displayed in the File name field. If you already selected a files or subfolders, just type a random string in the File name field and click Open. If the file name you enter is not found, WinMerge opens the folder.

1.4.

Does WinMerge support merging three files (sometimes called 3-way merge), where one file is the ancestor? This would be useful for version control!

Unfortunately not. We recognize that it would be a good feature, but have no plans to implement it in near future. You can work around this limitation somewhat by using two WinMerge instances, or by using a third path parameter on the command line. See Command line for more information.

1.5.

Do you have any plans to support other operating systems besides Windows?

Not currently. If somebody wants to help with cross-platform support (using wxWidgets, for example) we are interested, of course.

1.6.

Why is there no CVS integration?

Providing an integration with CVS is of questionable value because there already are so many good CVS clients. However, WinMerge does provide an integration with the diff function of one of those clients, TortoiseCVS (as described in Version control integration). Also, WinMerge can resolve conflict files (see Resolving conflict files).

1.7.

What is an MRU list?

MRU is an abbreviation for “Most Recently Used”, and refers to the history lists in the Select Files or Folders dialog. The list contain the last twenty paths used on each side.

1.8.

Can WinMerge open OpenOffice files?

OpenOffice files are archives. To be able to open them in WinMerge, you have to configure archive support:

  • Install archive support, as described in 7-Zip and archive support.

  • In WinMerge, click the Options button (or click Edit → Options). In the Archive Support page, enable the Detect archive type from file signature option

1.9.

Why do large files sometimes show up as different in the Folder Compare window, but identical in the File Compare window?

This is because WinMerge always uses the Quick Contents file compare method for large files. This method enables WinMerge to compare large files more efficiently. To test if this is causing the behavior you're seeing, you can try raising the Quick Contents threshold for large files. See the discussion of this method in Starting a folder compare operation to learn how.

1.10.

WinMerge shows an error (or even crashes!) complaining it cannot load CompareMSWordFiles.dll or CompareMSExcelFiles.dll!

These files are plugins written with Visual Basic (6.0). The WinMerge installer does not contain Visual Basic runtime files, so those plugins cannot be loaded. You can address the problem using one of these options:

  • Remove these files from the WinMerge/Plugins folder.

  • Download the Visual Basic 6.0 runtime distribution from Microsoft®:http://support.microsoft.com/kb/290887 and install it. Or, download just the files you need from: http://www.dll-files.com/dllindex/dll-files.shtml?msvbvm60 and copy them to the WinMerge folder.

2. Installing

2.1. | WinMerge does not start and complains about missing DLL files (mfc71.dll, mfc71u.dll, msvcr71.dll, and msvcp71.dll)
 | When installing WinMerge from an archive (zip or 7z) file, you also need the runtime package containing those files. See the Installing from an archive in the installation Help topic for details.

3. File comparing

3.1. | Why do my files have all lines marked as different (colored), even though I know all the lines are not different?
 | Maybe your files have different line ending styles (for example, Windows and Unix). By default, WinMerge compares line ending styles. To disable it, click Edit → Options. In the Compare page, enable (check) the option, Ignore carriage return differences.

4. Questions about editor

4.1. | Why are some characters cut in half?
 | Try clicking View → Select Font and selecting a different font.
4.2. | I see question marks instead of letters in files.
 | This is what we call a lossy conversion. For Unicode files (UCS-2, UTF-8), use WinMergeU.exe. For ANSI files, this is probably due to code-page problems. To troubleshoot, click Edit → Options. Then in the Codepages page, see if the option Detect codepage info is checked. If it is, deselect the option, click OK, and see if that helps.
4.3. | I cannot select proportional fonts for editor.
 | Unfortunately, WinMerge supports only non-proportional fonts.
4.4. | What is delay of automatic rescan? Why it is needed?
 | When Automatic Rescan is enabled (in the Editor page of Options), WinMerge delays rescanning while you edit files. That is, no rescanning occurs until shortly after you stop typing. Without this delay, WinMerge would rescan after every typed character, making the editing process too slow. The delay especially improves editing bigger files, which can take several seconds to rescan.
4.5. | Can I print files from the File panes in the Compare Files window?
 | Yes, there is basic printing support: click File → Print.
4.6. | Can I hide similar lines in a file comparison, so that only different lines are visible?
 | No, you can't. Many users have requested this feature but we don't have any plans to implement it. We don't believe it would really improve usability.

5. WinMerge as external compare or diff-tool

5.1.

I want WinMerge to close with a single ESC press after I'm done?

Open WinMerge from the command line, and include the -e switch.

5.2.

I don't want to see the Files Are Identical message when I compare identical files, I just want WinMerge to quit.

Use the -x command line switch.

5.3.

How can I avoid filling the Select Files or Folders dialog history lists with temporary paths?

Have your external program invoke WinMerge with the /ub option, which tells WinMerge to not add the files to the MRU.

5.4.

But the program I'm using doesn't allow command line parameters!

Create a batch file that contains one of these lines (but not both):

  • CALL "<winmerge path>\WinMerge" /ub %1 %2
  • start "WinMerge" "<winmerge path>" /ub %1 %2

Call this batch file from your program.

6. Archive support

6.1.

I installed 7-Zip but archive support does not work.

You might have one of these problems:

  • Do you have the plugin installed, and does the plugin version match the 7-Zip version? If not, see the instructions for 7-Zip and archive support in the installation topic.

  • If the error is something like: 7-zip x.xx missing / Plugin present, then you probably installed 7-Zip using the MSI installer. Some 7-Zip MSI installers do not install all the files that WinMerge needs (specifically, 7zip_pad.xml in the 7-Zip program folder). Download and run the EXE version of the 7-Zip installer.

6.2.

How can I open the Perry-style patch files that WinMerge developers use when submitting patches?

Perry-style patches are zip files containing original and changed files in different directories. WinMerge has internal support (surprise!) for handling these files: just launch a compare operation, selecting the zip file for both the left and right sides. WinMerge opens the contents of the zip file in a Folder Compare window, comparing the original and changed files.

6.3.

I do not want to install 7-zip. Can archive support use other archive tools (like WinZip or WinRar)?

Unfortunately WinMerge can only use 7-zip.

6.4.

Can WinMerge open archive files with non-standard file-extensions? (For example .jar files as zip-files)

Yes: click the Options button (or click Edit → Options). In the Archive Support page, enable the Detect archive type from file signature option.

7. Text encoding (codepages)

7.1.

How do I tell if my file is coded in the local Windows (ANSI) codepage?

Open the file in Windows Notepad (for example, click Start → (All) Programs → Accessories → Notepad). Click File → Save As, and in the Save As dialog, scroll to the Encoding item at the dropdown list. The possible values include:

  • ANSI: The file is apparently in the local Windows codepage. If the file is entirely in English and normal punctuation, then the file is also in ASCII.

  • Unicode: The file is probably in the default Windows Unicode encoding, UCS-2LE.

  • UTF-8: The file is in the cross-platform Unicode encoding, UTF-8.

  • Unicode big endian: The file is in a different Unicode encoding that is little used or supported in Windows, probably UCS-2BE.

8. Patch files

8.1. | Is there way to create patch files from the command line?
 | No. It might be added in later versions. Until then, you can use the Win32 port of diffutils. The latest version of diffutils (and patch) can be downloaded from the SourceForge GnuWin32 project page: http://sourceforge.net/projects/gnuwin32.
8.2. | Can patches be applied using WinMerge?
 | No. However, you can apply patches using the patch tool from the GnuWin32 project, because WinMerge produces patch files that are compatible with GNU/diffutils. Also, see the preceding question.


Appendix A. Shortcut keys

WinMerge includes most of the familiar shortcut keys commonly used in other Windows applications.

Table A.1. Folder compare

Keys | Function
Enter | Open selected file or folder
Backspace | Open parent folder if possible (available only when subfolders are not included in compare)
F5 | Rescan folders
Alt+Home | Go to first different file or folder
Alt+End | Go to last different file or folder
Alt+Enter | Go to currently selected item (if scrolled off-screen)
Alt+Up Arrow | Go to previous different file or folder
Alt+Down Arrow | Go to next different file or folder
Alt+Left Arrow | Copy selected items from right to left
Alt+Right Arrow | Copy selected items from left to right

Table A.2. File compare

Keys | Function
Esc | Close window (if enabled in options)
F4 | Show line difference
F5 | Refresh
F6 | Change pane (active file)
F7 | Go to previous difference
F8 | Go to next difference
F9 | Merge Mode on or off (toggle)
Ctrl+G | Go to difference or line
Ctrl+Z | Undo last action
Ctrl+Y | Redo previously undone action

Table A.3. Difference navigation and merging (normal mode)

Keys | Function
Alt+Home | Go to first difference
Alt+End | Go to last difference
Alt+Enter | Go to current difference or select difference
Alt+Up Arrow | Go to previous difference
Alt+Down Arrow | Go to next difference
Alt+Left Arrow | Copy difference from right side to left side
Alt+Right Arrow | Copy difference from left side to right side
Ctrl+Alt+Left Arrow | Copy difference from right side to left side and select next difference
Ctrl+Alt+Right Arrow | Copy difference from left side to right side and select next difference

Table A.4. Difference navigation and merging (merge mode)

Keys | Function
Up Arrow | Go to previous difference
Down Arrow | Go to next difference
Left Arrow | Copy difference from right side to left side
Right Arrow | Copy difference from left side to right side
Ctrl+Alt+Left Arrow | Copy difference from right side to left side and select next difference
Ctrl+Alt+Right Arrow | Copy difference from left side to right side and select next difference

Table A.5. Find and Replace

Keys | Function
Ctrl+F | Find text (opens Find dialog)
Ctrl+H | Replace text (opens Replace dialog)
F3 | Find next
Shift+F3 | Find previous
Ctrl+F3 | Find selected text in file
Ctrl+Shift+F3 | Find selected text upwards in file

Table A.6. Bookmarks

Keys | Function
Ctrl+F2 | Toggle Bookmark
F2 | Next Bookmark
Shift+F2 | Previous Bookmark
Ctrl+Shift+F2 | Clear all Bookmarks
Alt+0 | Goto Bookmark 0
Ctrl+0 | Toggle Bookmark 0
Alt+1 | Goto Bookmark 1
Ctrl+1 | Toggle Bookmark 1
Alt+2 | Goto Bookmark 2
Ctrl+2 | Toggle Bookmark 2
Alt+3 | Goto Bookmark 3
Ctrl+3 | Toggle Bookmark 3
Alt+4 | Goto Bookmark 4
Ctrl+4 | Toggle Bookmark 4
Alt+5 | Goto Bookmark 5
Ctrl+5 | Toggle Bookmark 5
Alt+6 | Goto Bookmark 6
Ctrl+6 | Toggle Bookmark 6
Alt+7 | Goto Bookmark 7
Ctrl+7 | Toggle Bookmark 7
Alt+8 | Goto Bookmark 8
Ctrl+8 | Toggle Bookmark 8
Alt+9 | Goto Bookmark 9
Ctrl+9 | Toggle Bookmark 9

Table A.7. Zoom

Keys | Function
Ctrl++ | Increase text size
Ctrl+- | Decrease text size
Ctrl+* | Reset text zoom to default size
Ctrl+MouseWheel Up | Increase text size
Ctrl+MouseWheel Down | Decrease text size